aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 16:57:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 16:57:37 -0400
commit1481b9109fe771ec8b035d7760f42e36d2bed5d4 (patch)
treeabf3f6e7aa1aa98dc76ae8f04accc235918da53c /drivers/acpi/video.c
parent5042d99795d3d817bef2f4cc46e953bee9bf7398 (diff)
parentf88133d76ea38761b7379d6233b752ed82250a4a (diff)
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6: acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM ACPI: thinkpad-acpi: bump up version to 0.21 ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support ACPI: thinkpad-acpi: WLSW overrides other rfkill switches ACPI: thinkpad-acpi: prepare for bluetooth and wwan rfkill support ACPI: thinkpad-acpi: consolidate wlsw notification function ACPI: thinkpad-acpi: minor refactor on radio switch init Revert "ACPI: don't walk tables if ACPI was disabled" Revert "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled." Revert "Fix FADT parsing" ACPI : Set FAN device to correct state in boot phase ACPI: Ignore _BQC object when registering backlight device ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r--drivers/acpi/video.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 37b9e16710d6..e8a51a1700f7 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -741,7 +741,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
741 741
742 max_level = acpi_video_init_brightness(device); 742 max_level = acpi_video_init_brightness(device);
743 743
744 if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){ 744 if (device->cap._BCL && device->cap._BCM && max_level > 0) {
745 int result; 745 int result;
746 static int count = 0; 746 static int count = 0;
747 char *name; 747 char *name;
@@ -753,7 +753,17 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
753 device->backlight = backlight_device_register(name, 753 device->backlight = backlight_device_register(name,
754 NULL, device, &acpi_backlight_ops); 754 NULL, device, &acpi_backlight_ops);
755 device->backlight->props.max_brightness = device->brightness->count-3; 755 device->backlight->props.max_brightness = device->brightness->count-3;
756 device->backlight->props.brightness = acpi_video_get_brightness(device->backlight); 756 /*
757 * If there exists the _BQC object, the _BQC object will be
758 * called to get the current backlight brightness. Otherwise
759 * the brightness will be set to the maximum.
760 */
761 if (device->cap._BQC)
762 device->backlight->props.brightness =
763 acpi_video_get_brightness(device->backlight);
764 else
765 device->backlight->props.brightness =
766 device->backlight->props.max_brightness;
757 backlight_update_status(device->backlight); 767 backlight_update_status(device->backlight);
758 kfree(name); 768 kfree(name);
759 769