summaryrefslogtreecommitdiff
path: root/drivers/power/twl4030_madc_battery.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-09-04 16:01:30 +0400
committerSebastian Reichel <sre@kernel.org>2014-09-16 13:01:33 +0400
commit585b008743b5a14d93e3d506729c73978edc8da7 (patch)
treef9aebdaa291df8651f5733ad553039c338b36e40 /drivers/power/twl4030_madc_battery.c
parentf5b89affe2b2e6a6092f4228baf08a6dd59bfc61 (diff)
downloadlinux-585b008743b5a14d93e3d506729c73978edc8da7.tar.xz
power-supply: Don't return -EINVAL from __power_supply_find_supply_from_node()
We need to stop 'class_for_each_device' loop when a supply matches with the of-node. In order to achieve this we currently return -EINVAL from __power_supply_populate_supplied_from() on successful match. class_for_each_device() is free to return similar errors in other cases as well and so the choice of return value here isn't particularly great. This commit isn't removing the Hack but making it more elegant by returning '1' instead. Also power_supply_find_supply_from_node() can return errors other than -EPROBE_DEFER now if class_for_each_device() fails. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/twl4030_madc_battery.c')
0 files changed, 0 insertions, 0 deletions