Revert "power: bq2419x: disable charging function if charger fails to probe"
Syed Rafiuddin [Tue, 2 Apr 2013 11:17:05 +0000 (16:17 +0530)]
This reverts commit b3fcade6dbc33f41f7284f2e8581d075bb0fe09b.

Change-Id: Iee513c36df2aba8a0348533c326a92bd51a0afac
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/216076
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyong Bin Kim <hyongbink@nvidia.com>
Tested-by: Hyong Bin Kim <hyongbink@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/power/bq2419x-charger.c
include/linux/mfd/bq2419x.h

index 54d79de..71ba78b 100644 (file)
@@ -252,17 +252,6 @@ static int __devinit bq2419x_charger_probe(struct platform_device *pdev)
 
        if (!bcharger_pdata) {
                dev_err(&pdev->dev, "No Platform data");
-
-               charger = devm_kzalloc(&pdev->dev, sizeof(*charger), GFP_KERNEL);
-               if (!charger) {
-                       dev_err(&pdev->dev, "Memory alloc failed\n");
-                       return -ENOMEM;
-               }
-               charger->chip = dev_get_drvdata(pdev->dev.parent);
-               ret = regmap_update_bits(charger->chip->regmap, BQ2419X_PWR_ON_REG,
-                                       ENABLE_CHARGE_MASK, DISABLE_CHARGE);
-               if (ret < 0)
-                       dev_err(&pdev->dev, "register update failed, err %d\n", ret);
                return -EIO;
        }
 
index ef09e08..14c441c 100644 (file)
@@ -45,7 +45,6 @@ struct regmap;
 #define BQ24192i_IC_VER         0x18
 #define ENABLE_CHARGE_MASK      0x30
 #define ENABLE_CHARGE           0x10
-#define DISABLE_CHARGE          0x00
 
 #define BQ2419X_REG0                   0x0
 #define BQ2419X_EN_HIZ                 BIT(7)