Skip to content

Commit

Permalink
regulator: Fix the argument of calling regulator_mode_constrain
Browse files Browse the repository at this point in the history
The second parameter of regulator_mode_constrain takes a pointer.

This patch fixes below warning:
drivers/regulator/core.c: In function 'regulator_set_mode':
drivers/regulator/core.c:2014: warning: passing argument 2 of 'regulator_mode_constrain' makes pointer from integer without a cast
drivers/regulator/core.c:200: note: expected 'int *' but argument is of type 'unsigned int'

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@vega.(none)>
  • Loading branch information
Axel Lin authored and Liam Girdwood committed May 27, 2011
1 parent 1a39962 commit 22c51b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2011,7 +2011,7 @@ int regulator_set_mode(struct regulator *regulator, unsigned int mode)
}

/* constraints check */
ret = regulator_mode_constrain(rdev, mode);
ret = regulator_mode_constrain(rdev, &mode);
if (ret < 0)
goto out;

Expand Down

0 comments on commit 22c51b4

Please sign in to comment.