summaryrefslogtreecommitdiff
path: root/drivers/power/power_supply_sysfs.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-16 03:37:42 +0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2011-08-19 21:03:23 +0400
commit35c3ae5eef3fc641c75c5e1e4307835c8efa5f6b (patch)
tree0fbd69761ff8080bb2d5615073f486612a1a7464 /drivers/power/power_supply_sysfs.c
parent9ad63986c606c60e2e916b1b96f22991f966d9cc (diff)
downloadlinux-35c3ae5eef3fc641c75c5e1e4307835c8efa5f6b.tar.xz
wm831x_power: Only register WM831x battery charger if enabled
Don't tell the system about the battery charger if it's not enabled, we can reasonably assume that if the charger is not enabled then no battery will ever be connected so reporting state is at best going to waste time and at worst going to cause confusing information in the UI. For simplicity and robustness we continue to register and handle interrupts from the charger. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/power_supply_sysfs.c')
-rw-r--r--drivers/power/power_supply_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index 605514afc29f..eb9a986c4f9f 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -77,8 +77,8 @@ static ssize_t power_supply_show_property(struct device *dev,
dev_dbg(dev, "driver has no data for `%s' property\n",
attr->attr.name);
else if (ret != -ENODEV)
- dev_err(dev, "driver failed to report `%s' property\n",
- attr->attr.name);
+ dev_err(dev, "driver failed to report `%s' property: %d\n",
+ attr->attr.name, ret);
return ret;
}