bq27x00: Return -ENODEV for properties if the battery is not present
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 24 May 2010 19:57:33 +0000 (21:57 +0200)
committerLars-Peter Clausen <lars@metafoo.de>
Tue, 22 Feb 2011 10:02:40 +0000 (11:02 +0100)
commit3413b4ea250ff0b4142a154a2764e33979957e8b
treeb93cc44a5ee6880995f22bdc4601e0143b3f1472
parenta2e5118c370e78c3841606e7edc7677c986325fa
bq27x00: Return -ENODEV for properties if the battery is not present

This patch changes get_property callback of the bq27x00 battery to return
-ENODEV for properties other then the PROP_PRESENT if the battery is not
present.
The power subsystem core expects a driver to behave that way.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
drivers/power/bq27x00_battery.c