diff options
author | Hyungwon Hwang <human.hwang@samsung.com> | 2015-05-28 03:25:15 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-06-23 10:47:35 -0400 |
commit | cca0ba2df3d4000bacd9b7807d46ffafac62d53a (patch) | |
tree | c5aec01b81c2a18ab40cdcd8cc71eb9e8b5aba00 /include/linux/backlight.h | |
parent | cdaefccefa988495e732d85d81914fbba99f4ca6 (diff) |
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 <human.hwang@samsung.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/backlight.h')
-rw-r--r-- | include/linux/backlight.h | 8 |
1 files changed, 6 insertions, 2 deletions
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 { | |||
117 | int use_count; | 117 | int use_count; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | static inline void backlight_update_status(struct backlight_device *bd) | 120 | static inline int backlight_update_status(struct backlight_device *bd) |
121 | { | 121 | { |
122 | int ret = -ENOENT; | ||
123 | |||
122 | mutex_lock(&bd->update_lock); | 124 | mutex_lock(&bd->update_lock); |
123 | if (bd->ops && bd->ops->update_status) | 125 | if (bd->ops && bd->ops->update_status) |
124 | bd->ops->update_status(bd); | 126 | ret = bd->ops->update_status(bd); |
125 | mutex_unlock(&bd->update_lock); | 127 | mutex_unlock(&bd->update_lock); |
128 | |||
129 | return ret; | ||
126 | } | 130 | } |
127 | 131 | ||
128 | extern struct backlight_device *backlight_device_register(const char *name, | 132 | extern struct backlight_device *backlight_device_register(const char *name, |