[PATCH 2/4] power: supply: axp20x*: Drop check for disabled devices
From: Uwe Kleine-König
Date: Mon Sep 21 2026 - 06:18:35 EST
Since commit 6b5c350648b8 ("mfd: mfd-core: Honour Device Tree's request
to disable a child-device") the mfd core checks for disabled devices, so
there is no use in doing that again in the mfd child driver.
Drop the check in the two power drivers.
Signed-off-by: Uwe Kleine-König <ukleinek@xxxxxxxxxx>
---
drivers/power/supply/axp20x_ac_power.c | 3 ---
drivers/power/supply/axp20x_battery.c | 3 ---
drivers/power/supply/axp20x_usb_power.c | 3 ---
3 files changed, 9 deletions(-)
diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c
index d9892b351621..46889567bc18 100644
--- a/drivers/power/supply/axp20x_ac_power.c
+++ b/drivers/power/supply/axp20x_ac_power.c
@@ -326,9 +326,6 @@ static int axp20x_ac_power_probe(struct platform_device *pdev)
const struct axp_data *axp_data;
int i, irq, ret;
- if (!of_device_is_available(pdev->dev.of_node))
- return -ENODEV;
-
if (!axp20x) {
dev_err(&pdev->dev, "Parent drvdata not set\n");
return -EINVAL;
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index ee8701a6e907..c119014b319a 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -1097,9 +1097,6 @@ static int axp20x_power_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
int ret;
- if (!of_device_is_available(pdev->dev.of_node))
- return -ENODEV;
-
axp20x_batt = devm_kzalloc(&pdev->dev, sizeof(*axp20x_batt),
GFP_KERNEL);
if (!axp20x_batt)
diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
index e951b2b64b25..463f9fe35cec 100644
--- a/drivers/power/supply/axp20x_usb_power.c
+++ b/drivers/power/supply/axp20x_usb_power.c
@@ -924,9 +924,6 @@ static int axp20x_usb_power_probe(struct platform_device *pdev)
const struct axp_data *axp_data;
int i, irq, ret;
- if (!of_device_is_available(pdev->dev.of_node))
- return -ENODEV;
-
if (!axp20x) {
dev_err(&pdev->dev, "Parent drvdata not set\n");
return -EINVAL;
--
2.47.3