regulator: ab3100: cast fix

The AB3100 regulator driver emits a warning when compiled on 64bit
systems like this:

drivers/regulator/ab3100.c:
In function ‘ab3100_regulator_of_probe’:
srivers/regulator/ab3100.c:649:4:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

As the int is a different size than the 64bit pointer used to
pass regulator data. Switch to using an unsigned long as ID
passed for the regulator to get rid of the warning.

Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Linus Walleij 2014-01-23 15:20:01 +01:00 committed by Mark Brown
parent d8ec26d7f8
commit 23e21ddf6c

View File

@ -498,7 +498,7 @@ static int ab3100_regulator_register(struct platform_device *pdev,
struct ab3100_platform_data *plfdata, struct ab3100_platform_data *plfdata,
struct regulator_init_data *init_data, struct regulator_init_data *init_data,
struct device_node *np, struct device_node *np,
int id) unsigned long id)
{ {
struct regulator_desc *desc; struct regulator_desc *desc;
struct ab3100_regulator *reg; struct ab3100_regulator *reg;
@ -646,7 +646,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
err = ab3100_regulator_register( err = ab3100_regulator_register(
pdev, NULL, ab3100_regulator_matches[i].init_data, pdev, NULL, ab3100_regulator_matches[i].init_data,
ab3100_regulator_matches[i].of_node, ab3100_regulator_matches[i].of_node,
(int) ab3100_regulator_matches[i].driver_data); (unsigned long)ab3100_regulator_matches[i].driver_data);
if (err) { if (err) {
ab3100_regulators_remove(pdev); ab3100_regulators_remove(pdev);
return err; return err;