projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa11de0
)
backlight: msi-laptop, msi-wmi: fix incomplete registration failure handling
author
Bruno Prémont
<
[email protected]
>
Fri, 26 Feb 2010 12:17:16 +0000
(13:17 +0100)
committer
Richard Purdie
<
[email protected]
>
Tue, 16 Mar 2010 20:12:11 +0000
(20:12 +0000)
Properly return backlight registration error to parent.
Mark struct backlight_ops as const.
Signed-off-by: Bruno Prémont <
[email protected]
>
Reviewed-by: Anisse Astier <
[email protected]
>
Signed-off-by: Richard Purdie <
[email protected]
>
drivers/platform/x86/msi-wmi.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/msi-wmi.c
b/drivers/platform/x86/msi-wmi.c
index fb7ccaae65635cfc8758f3fea28e5f750489871e..367caaae2f3cfcc388238e3459b84835b1ca46c2 100644
(file)
--- a/
drivers/platform/x86/msi-wmi.c
+++ b/
drivers/platform/x86/msi-wmi.c
@@
-138,7
+138,7
@@
static int bl_set_status(struct backlight_device *bd)
return msi_wmi_set_block(0, backlight_map[bright]);
}
-static struct backlight_ops msi_backlight_ops = {
+static
const
struct backlight_ops msi_backlight_ops = {
.get_brightness = bl_get,
.update_status = bl_set_status,
};
@@
-255,8
+255,10
@@
static int __init msi_wmi_init(void)
backlight = backlight_device_register(DRV_NAME, NULL, NULL,
&msi_backlight_ops,
&props);
- if (IS_ERR(backlight))
+ if (IS_ERR(backlight)) {
+ err = PTR_ERR(backlight);
goto err_free_input;
+ }
err = bl_get(NULL);
if (err < 0)