power: max17042: remove exported API for charger status update
Laxman Dewangan [Wed, 19 Jun 2013 07:44:13 +0000 (12:44 +0530)]
Battery gauge driver, MAX17042, have the communication with charger
driver through battery-charger-gauge communication framework and so
no need to export the API for same purpose.

Removing the status_update() API.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/240069
(cherry picked from commit a620a3fe3f43ea9bf1a35c027f8d9cdebce0c74f)

Change-Id: Ifdcbb227ef045a5390db60a9d7bd9875569bd5bc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/253348
Reviewed-by: Automatic_Commit_Validation_User

drivers/power/max17042_battery.c
include/linux/power/max17042_battery.h

index c40abbf..3ce85d9 100644 (file)
@@ -84,7 +84,6 @@ struct max17042_chip {
        int status;
        int cap;
 };
-struct max17042_chip *tmp_chip;
 struct i2c_client *temp_client;
 
 static int max17042_write_reg(struct i2c_client *client, u8 reg, u16 value)
@@ -167,18 +166,6 @@ int maxim_get_temp(int *deci_celsius)
 }
 EXPORT_SYMBOL_GPL(maxim_get_temp);
 
-void max17042_update_status(int status)
-{
-       if (!tmp_chip) {
-               WARN_ON(1);
-               return;
-       }
-
-       tmp_chip->status = status;
-       power_supply_changed(&tmp_chip->battery);
-}
-EXPORT_SYMBOL_GPL(max17042_update_status);
-
 static int max17042_get_property(struct power_supply *psy,
                            enum power_supply_property psp,
                            union power_supply_propval *val)
@@ -793,7 +780,6 @@ static int max17042_probe(struct i2c_client *client,
                dev_err(&client->dev, "no platform data provided\n");
                return -EINVAL;
        }
-       tmp_chip = chip;
        i2c_set_clientdata(client, chip);
 
        ret = max17042_read_reg(chip->client, MAX17042_DevName);
index 79d99f6..36d7bad 100644 (file)
@@ -219,7 +219,6 @@ struct max17042_platform_data {
 
 #ifdef CONFIG_BATTERY_MAX17042
 extern int maxim_get_temp(int *deci_celsius);
-extern void max17042_update_status(int status);
 #else
 static inline int maxim_get_temp(int *deci_celsius)
 {
@@ -227,6 +226,5 @@ static inline int maxim_get_temp(int *deci_celsius)
        *deci_celsius = -2732;
        return -ENODEV;
 }
-static inline void max17042_update_status(int status) {}
 #endif
 #endif /* __MAX17042_BATTERY_H_ */