aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/acer-wmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/acer-wmi.c')
-rw-r--r--drivers/platform/x86/acer-wmi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 226b3e93498c..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
@@ -922,9 +923,13 @@ static struct backlight_ops acer_bl_ops = {
922 923
923static int __devinit acer_backlight_init(struct device *dev) 924static int __devinit acer_backlight_init(struct device *dev)
924{ 925{
926 struct backlight_properties props;
925 struct backlight_device *bd; 927 struct backlight_device *bd;
926 928
927 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);
928 if (IS_ERR(bd)) { 933 if (IS_ERR(bd)) {
929 printk(ACER_ERR "Could not register Acer backlight device\n"); 934 printk(ACER_ERR "Could not register Acer backlight device\n");
930 acer_backlight_device = NULL; 935 acer_backlight_device = NULL;
@@ -935,7 +940,6 @@ static int __devinit acer_backlight_init(struct device *dev)
935 940
936 bd->props.power = FB_BLANK_UNBLANK; 941 bd->props.power = FB_BLANK_UNBLANK;
937 bd->props.brightness = read_brightness(bd); 942 bd->props.brightness = read_brightness(bd);
938 bd->props.max_brightness = max_brightness;
939 backlight_update_status(bd); 943 backlight_update_status(bd);
940 return 0; 944 return 0;
941} 945}