Remove unused enable_detection flag which is always true after
the device is proved.

Signed-off-by: Ikjoon Jang <[email protected]>
---
 drivers/power/supply/sbs-battery.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/power/supply/sbs-battery.c 
b/drivers/power/supply/sbs-battery.c
index 83b9924033bd..73461321eb05 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -185,7 +185,6 @@ struct sbs_info {
        struct power_supply             *power_supply;
        bool                            is_present;
        struct gpio_desc                *gpio_detect;
-       bool                            enable_detection;
        bool                            charger_broadcasts;
        int                             last_state;
        int                             poll_time;
@@ -876,9 +875,6 @@ static int sbs_get_property(struct power_supply *psy,
                return -EINVAL;
        }
 
-       if (!chip->enable_detection)
-               goto done;
-
        if (!chip->gpio_detect &&
                chip->is_present != (ret >= 0)) {
                sbs_update_presence(chip, (ret >= 0));
@@ -1007,7 +1003,6 @@ static int sbs_probe(struct i2c_client *client)
 
        chip->flags = (u32)(uintptr_t)device_get_match_data(&client->dev);
        chip->client = client;
-       chip->enable_detection = false;
        psy_cfg.of_node = client->dev.of_node;
        psy_cfg.drv_data = chip;
        chip->last_state = POWER_SUPPLY_STATUS_UNKNOWN;
@@ -1091,8 +1086,6 @@ static int sbs_probe(struct i2c_client *client)
 
        INIT_DELAYED_WORK(&chip->work, sbs_delayed_work);
 
-       chip->enable_detection = true;
-
        return 0;
 
 exit_psupply:
-- 
2.28.0.236.gb10cc79966-goog

Reply via email to