Commit Graph

6 Commits (a12810ab9fcf0c9fd5e50b5e350a3ffbeaa571be)

Author SHA1 Message Date
Dan Carpenter f4f95adf7c da9052-battery: Don't free IRQ that wasn't requested
We should decrement "i" before doing the free_irq().  If we call this
because request_threaded_irq() failed then we don't want to free the
thing which failed.  Or in the case where we get here because
power_supply_register() failed then the original codes does a read past
the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-09-20 15:00:12 -07:00
Anton Vorontsov bc909f27f5 da9052-battery: Fix da9052_determine_vc_tbl_index's return value
The patch fixes the following warnings:

  CHECK   drivers/power/da9052-battery.c
drivers/power/da9052-battery.c:330:15: warning: symbol 'da9052_determine_vc_tbl_index' was not declared. Should it be static?
  CC      drivers/power/da9052-battery.o
drivers/power/da9052-battery.c: In function 'da9052_determine_vc_tbl_index':
drivers/power/da9052-battery.c:348:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-08-22 19:31:42 -07:00
Axel Lin 534f5306d7 da9052-battery: Convert to use module_platform_driver
Use the module_platform_driver() macro which makes the code smaller
and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26 20:41:17 +04:00
Axel Lin 61bb5a780d da9052-battery: Fix a memory leak when unload the module
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26 20:41:16 +04:00
Axel Lin e1be832999 da9052-battery: Add missing platform_set_drvdata
Add missing platform_set_drvdata in da9052_bat_probe.
Otherwise, calling platform_get_drvdata in da9052_bat_remove returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26 20:41:15 +04:00
Ashish Jangam ded7fc7b05 power_supply: Add DA9052 battery driver
Driver for DA9052 battery charger. This driver depends on DA9052 MFD core
dirver for definitions and methods.

This patch is functionally tested on Samsung SMDKV6410.

Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2012-01-06 06:10:02 +04:00