Skip to content

Commit ce0ae83

Browse files
krzksre
authored andcommitted
power: supply: max17040: simplify POWER_SUPPLY_PROP_ONLINE
The driver was reporting POWER_SUPPLY_PROP_ONLINE via platform data functions or '1' if no platform data was provided. Since there are no platforms using the driver with platform data (no board files with the driver), the online property can be simplified to always return '1'. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent c603bec commit ce0ae83

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/power/supply/max17040_battery.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ static int max17040_get_version(struct max17040_chip *chip)
219219

220220
static int max17040_get_online(struct max17040_chip *chip)
221221
{
222-
return chip->pdata && chip->pdata->battery_online ?
223-
chip->pdata->battery_online() : 1;
222+
return 1;
224223
}
225224

226225
static int max17040_get_of_data(struct max17040_chip *chip)

0 commit comments

Comments
 (0)