mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
power: supply: core: remove power_supply_for_each_device()
There are no users anymore. All potential future users are expected to use power_supply_for_each_psy(). Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-6-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
230fb418b4
commit
bfc330323c
|
|
@ -115,12 +115,6 @@ static void power_supply_changed_work(struct work_struct *work)
|
|||
spin_unlock_irqrestore(&psy->changed_lock, flags);
|
||||
}
|
||||
|
||||
int power_supply_for_each_device(void *data, int (*fn)(struct device *dev, void *data))
|
||||
{
|
||||
return class_for_each_device(&power_supply_class, NULL, data, fn);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(power_supply_for_each_device);
|
||||
|
||||
struct psy_for_each_psy_cb_data {
|
||||
int (*fn)(struct power_supply *psy, void *data);
|
||||
void *data;
|
||||
|
|
@ -141,7 +135,7 @@ int power_supply_for_each_psy(void *data, int (*fn)(struct power_supply *psy, vo
|
|||
.data = data,
|
||||
};
|
||||
|
||||
return power_supply_for_each_device(&cb_data, psy_for_each_psy_cb);
|
||||
return class_for_each_device(&power_supply_class, NULL, &cb_data, psy_for_each_psy_cb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(power_supply_for_each_psy);
|
||||
|
||||
|
|
|
|||
|
|
@ -881,7 +881,6 @@ extern int power_supply_powers(struct power_supply *psy, struct device *dev);
|
|||
#define to_power_supply(device) container_of(device, struct power_supply, dev)
|
||||
|
||||
extern void *power_supply_get_drvdata(struct power_supply *psy);
|
||||
extern int power_supply_for_each_device(void *data, int (*fn)(struct device *dev, void *data));
|
||||
extern int power_supply_for_each_psy(void *data, int (*fn)(struct power_supply *psy, void *data));
|
||||
|
||||
static inline bool power_supply_is_amp_property(enum power_supply_property psp)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user