diff options
author | Len Brown <len.brown@intel.com> | 2008-11-12 03:15:50 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-11-12 03:15:50 +0100 |
commit | f398778aa336a2919ee04ba45d915007230c6957 (patch) | |
tree | c7244cd1d4af8d99c861b21ebcaeabf23e355b9f /drivers/acpi/video.c | |
parent | Merge branch 'sysfs' into release (diff) | |
parent | thinkpad_acpi: fingers off backlight if video.ko is serving this functionality (diff) | |
download | linux-f398778aa336a2919ee04ba45d915007230c6957.tar.xz linux-f398778aa336a2919ee04ba45d915007230c6957.zip |
Merge branch 'video' into release
Conflicts:
Documentation/kernel-parameters.txt
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index a3aad30d39f6..baa441929720 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -738,7 +738,8 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) device->cap._DSS = 1; } - max_level = acpi_video_init_brightness(device); + if (acpi_video_backlight_support()) + max_level = acpi_video_init_brightness(device); if (device->cap._BCL && device->cap._BCM && max_level > 0) { int result; @@ -784,18 +785,21 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) printk(KERN_ERR PREFIX "Create sysfs link\n"); } - if (device->cap._DCS && device->cap._DSS){ - static int count = 0; - char *name; - name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); - if (!name) - return; - sprintf(name, "acpi_video%d", count++); - device->output_dev = video_output_register(name, - NULL, device, &acpi_output_properties); - kfree(name); + + if (acpi_video_display_switch_support()) { + + if (device->cap._DCS && device->cap._DSS) { + static int count; + char *name; + name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); + if (!name) + return; + sprintf(name, "acpi_video%d", count++); + device->output_dev = video_output_register(name, + NULL, device, &acpi_output_properties); + kfree(name); + } } - return; } /* @@ -841,11 +845,16 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video) static int acpi_video_bus_check(struct acpi_video_bus *video) { acpi_status status = -ENOENT; - + struct device *dev; if (!video) return -EINVAL; + dev = acpi_get_physical_pci_device(video->device->handle); + if (!dev) + return -ENODEV; + put_device(dev); + /* Since there is no HID, CID and so on for VGA driver, we have * to check well known required nodes. */ |