summaryrefslogtreecommitdiff
path: root/drivers/power/supply/abx500_chargalg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/supply/abx500_chargalg.c')
-rw-r--r--drivers/power/supply/abx500_chargalg.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c
index a9d84d845f24..f5b792243727 100644
--- a/drivers/power/supply/abx500_chargalg.c
+++ b/drivers/power/supply/abx500_chargalg.c
@@ -28,10 +28,11 @@
#include <linux/mfd/core.h>
#include <linux/mfd/abx500.h>
#include <linux/mfd/abx500/ab8500.h>
-#include <linux/mfd/abx500/ux500_chargalg.h>
-#include <linux/mfd/abx500/ab8500-bm.h>
#include <linux/notifier.h>
+#include "ab8500-bm.h"
+#include "ab8500-chargalg.h"
+
/* Watchdog kick interval */
#define CHG_WD_INTERVAL (6 * HZ)
@@ -1980,7 +1981,6 @@ static const struct power_supply_desc abx500_chargalg_desc = {
static int abx500_chargalg_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- struct abx500_bm_data *plat = pdev->dev.platform_data;
struct power_supply_config psy_cfg = {};
struct abx500_chargalg *di;
int ret = 0;
@@ -1991,18 +1991,12 @@ static int abx500_chargalg_probe(struct platform_device *pdev)
return -ENOMEM;
}
- if (!plat) {
- dev_err(&pdev->dev, "no battery management data supplied\n");
- return -EINVAL;
- }
- di->bm = plat;
+ di->bm = &ab8500_bm_data;
- if (np) {
- ret = ab8500_bm_of_probe(&pdev->dev, np, di->bm);
- if (ret) {
- dev_err(&pdev->dev, "failed to get battery information\n");
- return ret;
- }
+ ret = ab8500_bm_of_probe(&pdev->dev, np, di->bm);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to get battery information\n");
+ return ret;
}
/* get device struct and parent */