[PATCH 1/3] power: supply: core: Remove unused power_supply_set_battery_charged

From: linux
Date: Fri Mar 07 2025 - 18:02:51 EST


From: "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx>

power_supply_set_battery_charged() has been unused since 2019's
commit 0f884f8a090e ("ARM: pxa: remove raumfeld board files and
defconfig")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@xxxxxxxxxxx>
---
drivers/power/supply/power_supply_core.c | 13 -------------
include/linux/power_supply.h | 1 -
2 files changed, 14 deletions(-)

diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index 76c340b38015..47e0fea84917 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -449,19 +449,6 @@ int power_supply_get_property_from_supplier(struct power_supply *psy,
}
EXPORT_SYMBOL_GPL(power_supply_get_property_from_supplier);

-int power_supply_set_battery_charged(struct power_supply *psy)
-{
- if (atomic_read(&psy->use_cnt) >= 0 &&
- psy->desc->type == POWER_SUPPLY_TYPE_BATTERY &&
- psy->desc->set_charged) {
- psy->desc->set_charged(psy);
- return 0;
- }
-
- return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(power_supply_set_battery_charged);
-
static int power_supply_match_device_by_name(struct device *dev, const void *data)
{
const char *name = data;
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 6ed53b292162..5afc5946eb03 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -852,7 +852,6 @@ extern int power_supply_am_i_supplied(struct power_supply *psy);
int power_supply_get_property_from_supplier(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val);
-extern int power_supply_set_battery_charged(struct power_supply *psy);

static inline bool
power_supply_supports_maintenance_charging(struct power_supply_battery_info *info)
--
2.48.1