diff options
author | Len Brown <len.brown@intel.com> | 2008-11-11 21:15:50 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-11-11 21:15:50 -0500 |
commit | f398778aa336a2919ee04ba45d915007230c6957 (patch) | |
tree | c7244cd1d4af8d99c861b21ebcaeabf23e355b9f /drivers/acpi/video.c | |
parent | 9b5a56ddfd615a27e3a0856ceae1592a24021e42 (diff) | |
parent | 2dba1b5d87e08a294da5cdfa4d32908000e9b085 (diff) | |
download | talos-obmc-linux-f398778aa336a2919ee04ba45d915007230c6957.tar.gz talos-obmc-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. */ |