Skip to content

Commit 32fe18d

Browse files
jwrdegoedesre
authored andcommitted
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>
1 parent 1269774 commit 32fe18d

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

drivers/power/supply/twl4030_madc_battery.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,13 @@ static int twl4030_madc_bat_get_property(struct power_supply *psy,
168168
return 0;
169169
}
170170

171-
static void twl4030_madc_bat_ext_changed(struct power_supply *psy)
172-
{
173-
power_supply_changed(psy);
174-
}
175-
176171
static const struct power_supply_desc twl4030_madc_bat_desc = {
177172
.name = "twl4030_battery",
178173
.type = POWER_SUPPLY_TYPE_BATTERY,
179174
.properties = twl4030_madc_bat_props,
180175
.num_properties = ARRAY_SIZE(twl4030_madc_bat_props),
181176
.get_property = twl4030_madc_bat_get_property,
182-
.external_power_changed = twl4030_madc_bat_ext_changed,
183-
177+
.external_power_changed = power_supply_changed,
184178
};
185179

186180
static int twl4030_cmp(const void *a, const void *b)

0 commit comments

Comments
 (0)