diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2020-07-19 10:07:42 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2020-07-20 10:27:09 +0100 |
commit | 0f6a3256fd810eeca9c56cccafee46359d995138 (patch) | |
tree | fd9686e6761bf89daeb84d173eed0d5305f42df4 | |
parent | 51d53e5b06b8e75d02a17bfe678e7be7554a2322 (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>
-rw-r--r-- | drivers/video/backlight/backlight.c | 7 | ||||
-rw-r--r-- | include/linux/backlight.h | 10 |
2 files changed, 5 insertions, 12 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; diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 26e89a8033f5..64f91324c911 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -389,16 +389,6 @@ static inline int backlight_disable(struct backlight_device *bd) } /** - * backlight_put - Drop backlight reference - * @bd: the backlight device to put - */ -static inline void backlight_put(struct backlight_device *bd) -{ - if (bd) - put_device(&bd->dev); -} - -/** * backlight_is_blank - Return true if display is expected to be blank * @bd: the backlight device * |