* [PATCH] backlight: lp855x: disable enable regulator when remove
@ 2019-11-01 6:53 Chuhong Yuan
0 siblings, 0 replies; only message in thread
From: Chuhong Yuan @ 2019-11-01 6:53 UTC (permalink / raw)
Cc: Milo Kim, Lee Jones, Daniel Thompson, Jingoo Han,
Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel,
Chuhong Yuan
lp855x forgets to disable enable regulator when remove.
Add a call to regulator_disable in remove just like what is done to
supply regulator.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/video/backlight/lp855x_bl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
index f68920131a4a..4fcf9ec18868 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -499,6 +499,8 @@ static int lp855x_remove(struct i2c_client *cl)
backlight_update_status(lp->bl);
if (lp->supply)
regulator_disable(lp->supply);
+ if (lp->enable)
+ regulator_disable(lp->enable);
sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group);
return 0;
--
2.23.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-11-01 6:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-01 6:53 [PATCH] backlight: lp855x: disable enable regulator when remove Chuhong Yuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).