[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210507161927.105862-2-krzysztof.kozlowski@canonical.com>
Date: Fri, 7 May 2021 12:19:26 -0400
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Sebastian Reichel <sre@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Cc: Iskren Chernev <iskren.chernev@...il.com>,
Jonathan Bakker <xc-racer2@...e.ca>,
Matheus Castello <matheus@...tello.eng.br>,
Marek Szyprowski <m.szyprowski@...sung.com>
Subject: [RFT PATCH 2/3] 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 <krzysztof.kozlowski@...onical.com>
---
drivers/power/supply/max17040_battery.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c
index 12854c87df53..d51c3443d732 100644
--- a/drivers/power/supply/max17040_battery.c
+++ b/drivers/power/supply/max17040_battery.c
@@ -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)
--
2.25.1
Powered by blists - more mailing lists