summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2017-01-10 20:48:12 +0300
committerSebastian Reichel <sre@kernel.org>2017-01-12 03:03:53 +0300
commit15df6d98ec3b40775918fc6ef73d7f1c2d0cf870 (patch)
tree7833c3a9b177fb34ca3dc436262ee5cd48da853d /drivers/power
parente839a448814584e73a79c1fa76caace2ef42e0ee (diff)
downloadlinux-15df6d98ec3b40775918fc6ef73d7f1c2d0cf870.tar.xz
power: supply: axp20x_usb_power: fix warning on 64bit
Casting of_device_get_match_data return value to int causes warning on 64bit architectures. ../drivers/power/supply/axp20x_usb_power.c: In function 'axp20x_usb_power_probe': ../drivers/power/supply/axp20x_usb_power.c:297:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Fixes: 0dcc70ca8644 ("power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible") Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/axp20x_usb_power.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
index 1bcb02551e02..632a33fe2d54 100644
--- a/drivers/power/supply/axp20x_usb_power.c
+++ b/drivers/power/supply/axp20x_usb_power.c
@@ -48,7 +48,7 @@ struct axp20x_usb_power {
struct device_node *np;
struct regmap *regmap;
struct power_supply *supply;
- int axp20x_id;
+ enum axp20x_variants axp20x_id;
};
static irqreturn_t axp20x_usb_power_irq(int irq, void *devid)
@@ -294,7 +294,8 @@ static int axp20x_usb_power_probe(struct platform_device *pdev)
if (!power)
return -ENOMEM;
- power->axp20x_id = (int)of_device_get_match_data(&pdev->dev);
+ power->axp20x_id = (enum axp20x_variants)of_device_get_match_data(
+ &pdev->dev);
power->np = pdev->dev.of_node;
power->regmap = axp20x->regmap;