diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 19:48:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 19:48:00 -0400 |
commit | 61d718076e95eb461fd4c3692b702a82e2be0df4 (patch) | |
tree | 7c5d489840c85692bf2d14eda120cb0cb0e673c0 /drivers/acpi/video.c | |
parent | 5dbc2f543d2eb5499f3839d1abb72105cf0c03af (diff) | |
parent | ec57af9c2ece22ae6234189972105d777ff5f939 (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/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 2ff2b6ab5b6c..cbe6f3924a10 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -998,6 +998,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
998 | } | 998 | } |
999 | 999 | ||
1000 | if (acpi_video_backlight_support()) { | 1000 | if (acpi_video_backlight_support()) { |
1001 | struct backlight_properties props; | ||
1001 | int result; | 1002 | int result; |
1002 | static int count = 0; | 1003 | static int count = 0; |
1003 | char *name; | 1004 | char *name; |
@@ -1010,12 +1011,14 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
1010 | return; | 1011 | return; |
1011 | 1012 | ||
1012 | sprintf(name, "acpi_video%d", count++); | 1013 | sprintf(name, "acpi_video%d", count++); |
1013 | device->backlight = backlight_device_register(name, | 1014 | memset(&props, 0, sizeof(struct backlight_properties)); |
1014 | NULL, device, &acpi_backlight_ops); | 1015 | props.max_brightness = device->brightness->count - 3; |
1016 | device->backlight = backlight_device_register(name, NULL, device, | ||
1017 | &acpi_backlight_ops, | ||
1018 | &props); | ||
1015 | kfree(name); | 1019 | kfree(name); |
1016 | if (IS_ERR(device->backlight)) | 1020 | if (IS_ERR(device->backlight)) |
1017 | return; | 1021 | return; |
1018 | device->backlight->props.max_brightness = device->brightness->count-3; | ||
1019 | 1022 | ||
1020 | result = sysfs_create_link(&device->backlight->dev.kobj, | 1023 | result = sysfs_create_link(&device->backlight->dev.kobj, |
1021 | &device->dev->dev.kobj, "device"); | 1024 | &device->dev->dev.kobj, "device"); |