summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-08-06 17:44:19 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-07 19:07:55 +0200
commit2f6c797f84fd764efb5eeb7cbb6a80a7244bd13c (patch)
tree02e0d421bbdda46d1bf869f8b6f530adbf0407a6
parentregulator: Fix space/tab confusion (diff)
downloadlinux-2f6c797f84fd764efb5eeb7cbb6a80a7244bd13c.tar.xz
linux-2f6c797f84fd764efb5eeb7cbb6a80a7244bd13c.zip
regulator: core: Fix cast to pointer from integer of different size warning
This is to address the following warning during compilation time: (Compile on x86_64) CC drivers/regulator/core.o drivers/regulator/core.c: In function '_regulator_do_set_voltage': drivers/regulator/core.c:2183:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] This patch adds a temporary variable to avoid double cast. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--drivers/regulator/core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b28221af648e..5f2221095a46 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2179,9 +2179,12 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
}
}
- if (ret == 0 && best_val >= 0)
+ if (ret == 0 && best_val >= 0) {
+ unsigned long data = best_val;
+
_notifier_call_chain(rdev, REGULATOR_EVENT_VOLTAGE_CHANGE,
- (void *)best_val);
+ (void *)data);
+ }
trace_regulator_set_voltage_complete(rdev_get_name(rdev), best_val);