aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/supply/sbs-battery.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
index e07d570f504f..7fd0f308189f 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -171,7 +171,6 @@ struct sbs_info {
171 u32 i2c_retry_count; 171 u32 i2c_retry_count;
172 u32 poll_retry_count; 172 u32 poll_retry_count;
173 struct delayed_work work; 173 struct delayed_work work;
174 int ignore_changes;
175}; 174};
176 175
177static char model_name[I2C_SMBUS_BLOCK_MAX + 1]; 176static char model_name[I2C_SMBUS_BLOCK_MAX + 1];
@@ -694,11 +693,6 @@ static void sbs_external_power_changed(struct power_supply *psy)
694{ 693{
695 struct sbs_info *chip = power_supply_get_drvdata(psy); 694 struct sbs_info *chip = power_supply_get_drvdata(psy);
696 695
697 if (chip->ignore_changes > 0) {
698 chip->ignore_changes--;
699 return;
700 }
701
702 /* cancel outstanding work */ 696 /* cancel outstanding work */
703 cancel_delayed_work_sync(&chip->work); 697 cancel_delayed_work_sync(&chip->work);
704 698
@@ -775,10 +769,6 @@ static int sbs_probe(struct i2c_client *client,
775 chip->enable_detection = false; 769 chip->enable_detection = false;
776 psy_cfg.of_node = client->dev.of_node; 770 psy_cfg.of_node = client->dev.of_node;
777 psy_cfg.drv_data = chip; 771 psy_cfg.drv_data = chip;
778 /* ignore first notification of external change, it is generated
779 * from the power_supply_register call back
780 */
781 chip->ignore_changes = 1;
782 chip->last_state = POWER_SUPPLY_STATUS_UNKNOWN; 772 chip->last_state = POWER_SUPPLY_STATUS_UNKNOWN;
783 773
784 /* use pdata if available, fall back to DT properties, 774 /* use pdata if available, fall back to DT properties,