diff options
Diffstat (limited to 'drivers/platform/x86/asus_acpi.c')
-rw-r--r-- | drivers/platform/x86/asus_acpi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c index 1381430e1105..92fd30c9379c 100644 --- a/drivers/platform/x86/asus_acpi.c +++ b/drivers/platform/x86/asus_acpi.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/init.h> | 36 | #include <linux/init.h> |
36 | #include <linux/types.h> | 37 | #include <linux/types.h> |
37 | #include <linux/proc_fs.h> | 38 | #include <linux/proc_fs.h> |
@@ -1481,6 +1482,7 @@ static void asus_acpi_exit(void) | |||
1481 | 1482 | ||
1482 | static int __init asus_acpi_init(void) | 1483 | static int __init asus_acpi_init(void) |
1483 | { | 1484 | { |
1485 | struct backlight_properties props; | ||
1484 | int result; | 1486 | int result; |
1485 | 1487 | ||
1486 | result = acpi_bus_register_driver(&asus_hotk_driver); | 1488 | result = acpi_bus_register_driver(&asus_hotk_driver); |
@@ -1507,15 +1509,17 @@ static int __init asus_acpi_init(void) | |||
1507 | return -ENODEV; | 1509 | return -ENODEV; |
1508 | } | 1510 | } |
1509 | 1511 | ||
1512 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
1513 | props.max_brightness = 15; | ||
1510 | asus_backlight_device = backlight_device_register("asus", NULL, NULL, | 1514 | asus_backlight_device = backlight_device_register("asus", NULL, NULL, |
1511 | &asus_backlight_data); | 1515 | &asus_backlight_data, |
1516 | &props); | ||
1512 | if (IS_ERR(asus_backlight_device)) { | 1517 | if (IS_ERR(asus_backlight_device)) { |
1513 | printk(KERN_ERR "Could not register asus backlight device\n"); | 1518 | printk(KERN_ERR "Could not register asus backlight device\n"); |
1514 | asus_backlight_device = NULL; | 1519 | asus_backlight_device = NULL; |
1515 | asus_acpi_exit(); | 1520 | asus_acpi_exit(); |
1516 | return -ENODEV; | 1521 | return -ENODEV; |
1517 | } | 1522 | } |
1518 | asus_backlight_device->props.max_brightness = 15; | ||
1519 | 1523 | ||
1520 | return 0; | 1524 | return 0; |
1521 | } | 1525 | } |