power: supply: max17040: simplify POWER_SUPPLY_PROP_ONLINE
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Fri, 7 May 2021 16:19:26 +0000 (12:19 -0400)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 4 Jun 2021 11:11:37 +0000 (13:11 +0200)
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 <krzysztof.kozlowski@canonical.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max17040_battery.c

index f569af6..aecc0c8 100644 (file)
@@ -219,8 +219,7 @@ static int max17040_get_version(struct max17040_chip *chip)
 
 static int max17040_get_online(struct max17040_chip *chip)
 {
-       return chip->pdata && chip->pdata->battery_online ?
-               chip->pdata->battery_online() : 1;
+       return 1;
 }
 
 static int max17040_get_of_data(struct max17040_chip *chip)