]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: da9150-fg: Use devm_delayed_work_autocancel()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 13 Feb 2022 17:55:05 +0000 (18:55 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 24 Feb 2022 11:17:41 +0000 (12:17 +0100)
commit3c87a01e3a1aeb4f5b07973967363fd1ad75738f
tree41c477f9a2496da8c11b410f2db473826766085a
parent887fef71734003e608e09412f525966c815ad8ac
power: supply: da9150-fg: Use devm_delayed_work_autocancel()

This driver only uses managed resources, except for the delayed work, if
it is used.

Use devm_delayed_work_autocancel() to also manage the delayed work.
The error handling path of the probe and the remove function can both be
removed.

This saves a few lines of code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/da9150-fg.c