summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/asus-laptop.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 16:48:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 16:48:00 -0700
commit61d718076e95eb461fd4c3692b702a82e2be0df4 (patch)
tree7c5d489840c85692bf2d14eda120cb0cb0e673c0 /drivers/platform/x86/asus-laptop.c
parent5dbc2f543d2eb5499f3839d1abb72105cf0c03af (diff)
parentec57af9c2ece22ae6234189972105d777ff5f939 (diff)
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: backlight: panasonic-laptop - Fix incomplete registration failure handling backlight: msi-laptop, msi-wmi: fix incomplete registration failure handling backlight: blackfin - Fix missing registration failure handling backlight: classmate-laptop - Fix missing registration failure handling backlight: mbp_nvidia_bl - add five more MacBook variants backlight: Allow properties to be passed at registration backlight: Add backlight_device parameter to check_fb video: backlight/progear, fix pci device refcounting backlight: l4f00242t03: Fix module licence absence. backlight: Revert some const qualifiers backlight: Add Epson L4F00242T03 LCD driver
Diffstat (limited to 'drivers/platform/x86/asus-laptop.c')
-rw-r--r--drivers/platform/x86/asus-laptop.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 791fcf32150..db5f7db2ba3 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -639,12 +639,16 @@ static int asus_backlight_init(struct asus_laptop *asus)
{
struct backlight_device *bd;
struct device *dev = &asus->platform_device->dev;
+ struct backlight_properties props;
if (!acpi_check_handle(asus->handle, METHOD_BRIGHTNESS_GET, NULL) &&
!acpi_check_handle(asus->handle, METHOD_BRIGHTNESS_SET, NULL) &&
lcd_switch_handle) {
+ memset(&props, 0, sizeof(struct backlight_properties));
+ props.max_brightness = 15;
+
bd = backlight_device_register(ASUS_LAPTOP_FILE, dev,
- asus, &asusbl_ops);
+ asus, &asusbl_ops, &props);
if (IS_ERR(bd)) {
pr_err("Could not register asus backlight device\n");
asus->backlight_device = NULL;
@@ -653,7 +657,6 @@ static int asus_backlight_init(struct asus_laptop *asus)
asus->backlight_device = bd;
- bd->props.max_brightness = 15;
bd->props.power = FB_BLANK_UNBLANK;
bd->props.brightness = asus_read_brightness(bd);
backlight_update_status(bd);