summaryrefslogtreecommitdiffstats
path: root/drivers/platform/olpc
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-12-21 08:17:51 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2020-05-10 18:56:30 +0200
commit29e9eff40f5edc2e5de63b28e700e82ed2b6b95c (patch)
treeae8d3371032443f06eb5f55b05a977a4baea8905 /drivers/platform/olpc
parentfa7cc725a343e305bef78e8d65be48f37d3f7720 (diff)
downloadlinux-29e9eff40f5edc2e5de63b28e700e82ed2b6b95c.tar.bz2
power: supply: olpc_battery: fix the power supply name
The framework is unhappy about them, because it uses the names in sysfs attributes: power_supply olpc-ac: hwmon: 'olpc-ac' is not a valid name attribute, please fix power_supply olpc-battery: hwmon: 'olpc-battery' is not a valid name attribute, please fix See also commit 648cd48c9e56 ("hwmon: Do not accept invalid name attributes") and commit 74d3b6419772 ("hwmon: Relax name attribute validation for new APIs"). Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/platform/olpc')
-rw-r--r--drivers/platform/olpc/olpc-xo175-ec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/olpc/olpc-xo175-ec.c b/drivers/platform/olpc/olpc-xo175-ec.c
index 83ed1fbf73cf..5e1d14e35f20 100644
--- a/drivers/platform/olpc/olpc-xo175-ec.c
+++ b/drivers/platform/olpc/olpc-xo175-ec.c
@@ -410,7 +410,7 @@ static void olpc_xo175_ec_complete(void *arg)
dev_dbg(dev, "got event %.2x\n", byte);
switch (byte) {
case EVENT_AC_CHANGE:
- psy = power_supply_get_by_name("olpc-ac");
+ psy = power_supply_get_by_name("olpc_ac");
if (psy) {
power_supply_changed(psy);
power_supply_put(psy);
@@ -420,7 +420,7 @@ static void olpc_xo175_ec_complete(void *arg)
case EVENT_BATTERY_CRITICAL:
case EVENT_BATTERY_SOC_CHANGE:
case EVENT_BATTERY_ERROR:
- psy = power_supply_get_by_name("olpc-battery");
+ psy = power_supply_get_by_name("olpc_battery");
if (psy) {
power_supply_changed(psy);
power_supply_put(psy);