Merge tag 'thermal-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/therma...
[linux-2.6-microblaze.git] / drivers / power / supply / abx500_chargalg.c
index a9d84d8..f5b7922 100644 (file)
 #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 */