aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Stübner <heiko@sntech.de>2014-09-17 07:21:48 -0400
committerMark Brown <broonie@kernel.org>2014-09-17 12:48:59 -0400
commit6f34163c5474326dd70239045f1957fe369460dd (patch)
treee89a4133407a267ee84e82f722afdb92fecf5f32
parentee30928ab616786cae926c5c2efaa4303ba66802 (diff)
regulator: fan53555: fix wrong cast in probe
The vendor-id gathered from the dt match-data was cast to int but assigned to an unsigned long, producing warnings on at least sparc, like drivers/regulator/fan53555.c: In function 'fan53555_regulator_probe': >> drivers/regulator/fan53555.c:373:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] di->vendor = (int) match->data; Fix this by using an appropriate cast. Reported-by: kbuild test robot Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/fan53555.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index f2f5535099a0..6ca6e2651168 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -370,7 +370,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
370 if (!match) 370 if (!match)
371 return -ENODEV; 371 return -ENODEV;
372 372
373 di->vendor = (int) match->data; 373 di->vendor = (unsigned long) match->data;
374 } else { 374 } else {
375 /* if no ramp constraint set, get the pdata ramp_delay */ 375 /* if no ramp constraint set, get the pdata ramp_delay */
376 if (!di->regulator->constraints.ramp_delay) { 376 if (!di->regulator->constraints.ramp_delay) {