diff options
-rw-r--r-- | drivers/power/supply/axp20x_usb_power.c | 5 | ||||
-rw-r--r-- | include/linux/mfd/axp20x.h | 2 |
2 files changed, 4 insertions, 3 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; diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 812806d6319b..f848ee86a339 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -13,7 +13,7 @@ #include <linux/regmap.h> -enum { +enum axp20x_variants { AXP152_ID = 0, AXP202_ID, AXP209_ID, |