Commit 0f6a3256 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Lee Jones

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: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 51d53e5b
......@@ -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;
......
......@@ -388,16 +388,6 @@ static inline int backlight_disable(struct backlight_device *bd)
return backlight_update_status(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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment