From cca0ba2df3d4000bacd9b7807d46ffafac62d53a Mon Sep 17 00:00:00 2001 From: Hyungwon Hwang Date: Thu, 28 May 2015 16:25:15 +0900 Subject: backlight: Change the return type of backlight_update_status() to int Backlight device returns the result of update_status(), but backlight_update_status() ignores it. So the consumers cannot confirm the result of their function call. This patch makes the result to be returned back for consumers. Signed-off-by: Hyungwon Hwang Acked-by: Jingoo Han Signed-off-by: Lee Jones --- include/linux/backlight.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/linux/backlight.h') diff --git a/include/linux/backlight.h b/include/linux/backlight.h index adb14a8616df..1e7a69adbe6f 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -117,12 +117,16 @@ struct backlight_device { int use_count; }; -static inline void backlight_update_status(struct backlight_device *bd) +static inline int backlight_update_status(struct backlight_device *bd) { + int ret = -ENOENT; + mutex_lock(&bd->update_lock); if (bd->ops && bd->ops->update_status) - bd->ops->update_status(bd); + ret = bd->ops->update_status(bd); mutex_unlock(&bd->update_lock); + + return ret; } extern struct backlight_device *backlight_device_register(const char *name, -- cgit v1.2.3