bq27x00_battery: Fix bugs introduced with BQ27425 support
authorNeilBrown <neilb@suse.de>
Sun, 2 Dec 2012 09:34:21 +0000 (20:34 +1100)
committerAnton Vorontsov <anton@enomsg.org>
Sun, 6 Jan 2013 02:53:28 +0000 (18:53 -0800)
commitbde83b9a6b44c1e0fd872e57ecc869cfcf88538f
treede603fcd6bbf7d79b889d731db252626e3b35257
parenta05be99174edc9f258ee68140b71b9645ad977ee
bq27x00_battery: Fix bugs introduced with BQ27425 support

commit a66f59ba2e994bf70274ef0513e24e0e7ae20c63

    bq27x00_battery: Add support for BQ27425 chip

introduced 2 bugs.

1/ 'chip' was set to BQ27425 unconditionally - breaking support for
   other devices;

2/ BQ27425 does not support cycle count, how the code still tries to
   get the cycle count for BQ27425, and now does it twice for other chips.

Signed-off-by: NeilBrown <neilb@suse.de>
Cc: Saranya Gopal <saranya.gopal@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/bq27x00_battery.c