Date: Wed, 8 Jan 2020 11:30:43 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356487 - head/sys/dev/extres/regulator Message-ID: <202001081130.008BUh3V051920@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Wed Jan 8 11:30:42 2020 New Revision: 356487 URL: https://svnweb.freebsd.org/changeset/base/356487 Log: 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: head/sys/dev/extres/regulator/regulator.c Modified: head/sys/dev/extres/regulator/regulator.c ============================================================================== --- head/sys/dev/extres/regulator/regulator.c Wed Jan 8 11:30:03 2020 (r356486) +++ head/sys/dev/extres/regulator/regulator.c Wed Jan 8 11:30:42 2020 (r356487) @@ -275,8 +275,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?202001081130.008BUh3V051920>