Skip to content

Commit

Permalink
regulator: fan53555: fix wrong cast in probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Stübner authored and Mark Brown committed Sep 17, 2014
1 parent ee30928 commit 6f34163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/fan53555.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
if (!match)
return -ENODEV;

di->vendor = (int) match->data;
di->vendor = (unsigned long) match->data;
} else {
/* if no ramp constraint set, get the pdata ramp_delay */
if (!di->regulator->constraints.ramp_delay) {
Expand Down

0 comments on commit 6f34163

Please sign in to comment.