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
This commit is contained in:
parent
546652fbe3
commit
650a41c6d0
@ -275,8 +275,9 @@ static int
|
|||||||
regnode_method_get_voltage(struct regnode *regnode, int *uvolt)
|
regnode_method_get_voltage(struct regnode *regnode, int *uvolt)
|
||||||
{
|
{
|
||||||
|
|
||||||
return (regnode->std_param.min_uvolt +
|
*uvolt = regnode->std_param.min_uvolt +
|
||||||
(regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2);
|
(regnode->std_param.max_uvolt - regnode->std_param.min_uvolt) / 2;
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user