Date: Tue, 16 Jun 2020 20:42:00 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362243 - stable/12/sys/dev/extres/regulator Message-ID: <202006162042.05GKg0lw060390@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Tue Jun 16 20:41:59 2020 New Revision: 362243 URL: https://svnweb.freebsd.org/changeset/base/362243 Log: MFC r356487: regulator: fix regnode_method_get_voltage This method is supposed to write the voltage into uvolt and return an errno compatible value. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23006 Modified: stable/12/sys/dev/extres/regulator/regulator.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/extres/regulator/regulator.c ============================================================================== --- stable/12/sys/dev/extres/regulator/regulator.c Tue Jun 16 20:38:55 2020 (r362242) +++ stable/12/sys/dev/extres/regulator/regulator.c Tue Jun 16 20:41:59 2020 (r362243) @@ -295,8 +295,9 @@ static int regnode_method_get_voltage(struct regnode *regnode, int *uvolt) { - return (regnode->std_param.min_uvolt + - (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2); + *uvolt = regnode->std_param.min_uvolt + + (regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2; + return (0); } int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006162042.05GKg0lw060390>