summaryrefslogtreecommitdiff
path: root/drivers/power/supply/axp20x_ac_power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/supply/axp20x_ac_power.c')
-rw-r--r--drivers/power/supply/axp20x_ac_power.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c
index 57e50208d537..5f6ea416fa30 100644
--- a/drivers/power/supply/axp20x_ac_power.c
+++ b/drivers/power/supply/axp20x_ac_power.c
@@ -13,7 +13,6 @@
#include <linux/mfd/axp20x.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/power_supply.h>
@@ -46,7 +45,7 @@ struct axp20x_ac_power {
struct iio_channel *acin_i;
bool has_acin_path_sel;
unsigned int num_irqs;
- unsigned int irqs[];
+ unsigned int irqs[] __counted_by(num_irqs);
};
static irqreturn_t axp20x_ac_power_irq(int irq, void *devid)
@@ -365,7 +364,7 @@ static int axp20x_ac_power_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, power);
- psy_cfg.of_node = pdev->dev.of_node;
+ psy_cfg.fwnode = dev_fwnode(&pdev->dev);
psy_cfg.drv_data = power;
power->supply = devm_power_supply_register(&pdev->dev,