diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-04-15 18:07:34 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-05-08 15:07:56 +0200 |
commit | 32fe18d0340d88e8ab6e5ecf57211276b9ac39bf (patch) | |
tree | a010a69c26b211b12de8e0b255fc70b798898c18 /drivers/power | |
parent | power: supply: max17042_battery: Refactor max17042_external_power_changed() (diff) | |
download | linux-32fe18d0340d88e8ab6e5ecf57211276b9ac39bf.tar.xz linux-32fe18d0340d88e8ab6e5ecf57211276b9ac39bf.zip |
power: supply: twl4030_madc_battery: Refactor twl4030_madc_bat_ext_changed()
twl4030_madc_bat_ext_changed() is a wrapper around
"power_supply_changed(psy);" and it has the same prototype.
Remove it, replacing it with making the external_power_changed
callback directly point to power_supply_changed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/twl4030_madc_battery.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/power/supply/twl4030_madc_battery.c b/drivers/power/supply/twl4030_madc_battery.c index 48649dcfe3a9..7fe029673b22 100644 --- a/drivers/power/supply/twl4030_madc_battery.c +++ b/drivers/power/supply/twl4030_madc_battery.c @@ -168,19 +168,13 @@ static int twl4030_madc_bat_get_property(struct power_supply *psy, return 0; } -static void twl4030_madc_bat_ext_changed(struct power_supply *psy) -{ - power_supply_changed(psy); -} - static const struct power_supply_desc twl4030_madc_bat_desc = { .name = "twl4030_battery", .type = POWER_SUPPLY_TYPE_BATTERY, .properties = twl4030_madc_bat_props, .num_properties = ARRAY_SIZE(twl4030_madc_bat_props), .get_property = twl4030_madc_bat_get_property, - .external_power_changed = twl4030_madc_bat_ext_changed, - + .external_power_changed = power_supply_changed, }; static int twl4030_cmp(const void *a, const void *b) |