diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-01-23 09:20:01 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-23 14:52:09 -0500 |
commit | 23e21ddf6c3d9cb37aa69da496f80e8481e2c8bd (patch) | |
tree | 6fd598864d1ec9244abec186902ccb50f26eb007 /drivers | |
parent | d8ec26d7f8287f5788a494f56e8814210f0e64be (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/ab3100.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index 77b46d0b37a6..e10febe9ec34 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c | |||
@@ -498,7 +498,7 @@ static int ab3100_regulator_register(struct platform_device *pdev, | |||
498 | struct ab3100_platform_data *plfdata, | 498 | struct ab3100_platform_data *plfdata, |
499 | struct regulator_init_data *init_data, | 499 | struct regulator_init_data *init_data, |
500 | struct device_node *np, | 500 | struct device_node *np, |
501 | int id) | 501 | unsigned long id) |
502 | { | 502 | { |
503 | struct regulator_desc *desc; | 503 | struct regulator_desc *desc; |
504 | struct ab3100_regulator *reg; | 504 | struct ab3100_regulator *reg; |
@@ -646,7 +646,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np) | |||
646 | err = ab3100_regulator_register( | 646 | err = ab3100_regulator_register( |
647 | pdev, NULL, ab3100_regulator_matches[i].init_data, | 647 | pdev, NULL, ab3100_regulator_matches[i].init_data, |
648 | ab3100_regulator_matches[i].of_node, | 648 | ab3100_regulator_matches[i].of_node, |
649 | (int) ab3100_regulator_matches[i].driver_data); | 649 | (unsigned long)ab3100_regulator_matches[i].driver_data); |
650 | if (err) { | 650 | if (err) { |
651 | ab3100_regulators_remove(pdev); | 651 | ab3100_regulators_remove(pdev); |
652 | return err; | 652 | return err; |