diff options
author | Daiane Angolini <daiane.angolini@foundries.io> | 2022-07-11 08:54:38 -0300 |
---|---|---|
committer | Daiane Angolini <daiane.angolini@foundries.io> | 2022-07-11 08:54:38 -0300 |
commit | 6d5d44ccd4eb52e4e467fb61c20d3c2c7d220d2b (patch) | |
tree | 1daeac33277273f3f8f286f5e587d66a54d2dc01 /drivers/power/supply/sbs-charger.c | |
parent | fa6c3168595c02bd9d5366fcc28c9e7304947a3d (diff) | |
parent | bc2e851e616a4d109669322f94102d1a763dbd82 (diff) |
Merge branch 'local/v5.15.33' into 5.15.32-2.0.0
This is the 5.15.33 stable release
Files which conflict can cause problem in future:
drivers/clk/imx/clk-imx8qxp-lpcg.c
reverted:
4b8a71f206c94445317179b79d7f91996f40dcfc clk: imx: off by one in imx_lpcg_parse_clks_from_dt()
drivers/mailbox/imx-mailbox.c
e8d90d8901e42f9ac039086af9f1829030204fa8 MLK-25649-4 mailbox: imx: Add support for identifying SCU wakeup source from sysfs
security/keys/trusted-keys/trusted_core.c
ae82e852ca1b899e936c02859c18a80467901b2f KEYS: trusted: allow use of TEE as backend without TCG_TPM support
Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
Diffstat (limited to 'drivers/power/supply/sbs-charger.c')
-rw-r--r-- | drivers/power/supply/sbs-charger.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/power/supply/sbs-charger.c b/drivers/power/supply/sbs-charger.c index 6fa65d118ec1..b08f7d0c4181 100644 --- a/drivers/power/supply/sbs-charger.c +++ b/drivers/power/supply/sbs-charger.c @@ -18,6 +18,7 @@ #include <linux/interrupt.h> #include <linux/regmap.h> #include <linux/bitops.h> +#include <linux/devm-helpers.h> #define SBS_CHARGER_REG_SPEC_INFO 0x11 #define SBS_CHARGER_REG_STATUS 0x13 @@ -209,7 +210,12 @@ static int sbs_probe(struct i2c_client *client, if (ret) return dev_err_probe(&client->dev, ret, "Failed to request irq\n"); } else { - INIT_DELAYED_WORK(&chip->work, sbs_delayed_work); + ret = devm_delayed_work_autocancel(&client->dev, &chip->work, + sbs_delayed_work); + if (ret) + return dev_err_probe(&client->dev, ret, + "Failed to init work for polling\n"); + schedule_delayed_work(&chip->work, msecs_to_jiffies(SBS_CHARGER_POLL_TIME)); } @@ -220,15 +226,6 @@ static int sbs_probe(struct i2c_client *client, return 0; } -static int sbs_remove(struct i2c_client *client) -{ - struct sbs_info *chip = i2c_get_clientdata(client); - - cancel_delayed_work_sync(&chip->work); - - return 0; -} - #ifdef CONFIG_OF static const struct of_device_id sbs_dt_ids[] = { { .compatible = "sbs,sbs-charger" }, @@ -245,7 +242,6 @@ MODULE_DEVICE_TABLE(i2c, sbs_id); static struct i2c_driver sbs_driver = { .probe = sbs_probe, - .remove = sbs_remove, .id_table = sbs_id, .driver = { .name = "sbs-charger", |