summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2020-07-19 10:07:42 +0200
committerLee Jones <lee.jones@linaro.org>2020-07-20 10:27:09 +0100
commit0f6a3256fd810eeca9c56cccafee46359d995138 (patch)
treefd9686e6761bf89daeb84d173eed0d5305f42df4 /drivers/video
parent51d53e5b06b8e75d02a17bfe678e7be7554a2322 (diff)
backlight: backlight: Drop backlight_put()
There are no external users of backlight_put(). Drop it and open code the two users in backlight.c. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/backlight.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 82dc93ca859a..cba8505fef5a 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -718,7 +718,10 @@ EXPORT_SYMBOL(of_find_backlight);
static void devm_backlight_release(void *data)
{
- backlight_put(data);
+ struct backlight_device *bd = data;
+
+ if (bd)
+ put_device(&bd->dev);
}
/**
@@ -746,7 +749,7 @@ struct backlight_device *devm_of_find_backlight(struct device *dev)
return bd;
ret = devm_add_action(dev, devm_backlight_release, bd);
if (ret) {
- backlight_put(bd);
+ put_device(&bd->dev);
return ERR_PTR(ret);
}
return bd;