Skip to content

Commit 23e21dd

Browse files
Linus Walleijbroonie
authored andcommitted
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>
1 parent d8ec26d commit 23e21dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/regulator/ab3100.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ static int ab3100_regulator_register(struct platform_device *pdev,
498498
struct ab3100_platform_data *plfdata,
499499
struct regulator_init_data *init_data,
500500
struct device_node *np,
501-
int id)
501+
unsigned long id)
502502
{
503503
struct regulator_desc *desc;
504504
struct ab3100_regulator *reg;
@@ -646,7 +646,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
646646
err = ab3100_regulator_register(
647647
pdev, NULL, ab3100_regulator_matches[i].init_data,
648648
ab3100_regulator_matches[i].of_node,
649-
(int) ab3100_regulator_matches[i].driver_data);
649+
(unsigned long)ab3100_regulator_matches[i].driver_data);
650650
if (err) {
651651
ab3100_regulators_remove(pdev);
652652
return err;

0 commit comments

Comments
 (0)