diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/platform/x86/acer-wmi.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/platform/x86/acer-wmi.c')
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 454970d2d701..1ea6c434d330 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/rfkill.h> | 36 | #include <linux/rfkill.h> |
37 | #include <linux/workqueue.h> | 37 | #include <linux/workqueue.h> |
38 | #include <linux/debugfs.h> | 38 | #include <linux/debugfs.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <acpi/acpi_drivers.h> | 41 | #include <acpi/acpi_drivers.h> |
41 | 42 | ||
@@ -96,9 +97,6 @@ struct acer_quirks { | |||
96 | MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB"); | 97 | MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB"); |
97 | MODULE_ALIAS("wmi:6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3"); | 98 | MODULE_ALIAS("wmi:6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3"); |
98 | 99 | ||
99 | /* Temporary workaround until the WMI sysfs interface goes in */ | ||
100 | MODULE_ALIAS("dmi:*:*Acer*:*:"); | ||
101 | |||
102 | /* | 100 | /* |
103 | * Interface capability flags | 101 | * Interface capability flags |
104 | */ | 102 | */ |
@@ -925,9 +923,13 @@ static struct backlight_ops acer_bl_ops = { | |||
925 | 923 | ||
926 | static int __devinit acer_backlight_init(struct device *dev) | 924 | static int __devinit acer_backlight_init(struct device *dev) |
927 | { | 925 | { |
926 | struct backlight_properties props; | ||
928 | struct backlight_device *bd; | 927 | struct backlight_device *bd; |
929 | 928 | ||
930 | bd = backlight_device_register("acer-wmi", dev, NULL, &acer_bl_ops); | 929 | memset(&props, 0, sizeof(struct backlight_properties)); |
930 | props.max_brightness = max_brightness; | ||
931 | bd = backlight_device_register("acer-wmi", dev, NULL, &acer_bl_ops, | ||
932 | &props); | ||
931 | if (IS_ERR(bd)) { | 933 | if (IS_ERR(bd)) { |
932 | printk(ACER_ERR "Could not register Acer backlight device\n"); | 934 | printk(ACER_ERR "Could not register Acer backlight device\n"); |
933 | acer_backlight_device = NULL; | 935 | acer_backlight_device = NULL; |
@@ -937,8 +939,7 @@ static int __devinit acer_backlight_init(struct device *dev) | |||
937 | acer_backlight_device = bd; | 939 | acer_backlight_device = bd; |
938 | 940 | ||
939 | bd->props.power = FB_BLANK_UNBLANK; | 941 | bd->props.power = FB_BLANK_UNBLANK; |
940 | bd->props.brightness = max_brightness; | 942 | bd->props.brightness = read_brightness(bd); |
941 | bd->props.max_brightness = max_brightness; | ||
942 | backlight_update_status(bd); | 943 | backlight_update_status(bd); |
943 | return 0; | 944 | return 0; |
944 | } | 945 | } |