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) |
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) | |||
738 | device->cap._DSS = 1; | 738 | device->cap._DSS = 1; |
739 | } | 739 | } |
740 | 740 | ||
741 | max_level = acpi_video_init_brightness(device); | 741 | if (acpi_video_backlight_support()) |
742 | max_level = acpi_video_init_brightness(device); | ||
742 | 743 | ||
743 | if (device->cap._BCL && device->cap._BCM && max_level > 0) { | 744 | if (device->cap._BCL && device->cap._BCM && max_level > 0) { |
744 | int result; | 745 | int result; |
@@ -784,18 +785,21 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
784 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 785 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
785 | 786 | ||
786 | } | 787 | } |
787 | if (device->cap._DCS && device->cap._DSS){ | 788 | |
788 | static int count = 0; | 789 | if (acpi_video_display_switch_support()) { |
789 | char *name; | 790 | |
790 | name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); | 791 | if (device->cap._DCS && device->cap._DSS) { |
791 | if (!name) | 792 | static int count; |
792 | return; | 793 | char *name; |
793 | sprintf(name, "acpi_video%d", count++); | 794 | name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); |
794 | device->output_dev = video_output_register(name, | 795 | if (!name) |
795 | NULL, device, &acpi_output_properties); | 796 | return; |
796 | kfree(name); | 797 | sprintf(name, "acpi_video%d", count++); |
798 | device->output_dev = video_output_register(name, | ||
799 | NULL, device, &acpi_output_properties); | ||
800 | kfree(name); | ||
801 | } | ||
797 | } | 802 | } |
798 | return; | ||
799 | } | 803 | } |
800 | 804 | ||
801 | /* | 805 | /* |
@@ -841,11 +845,16 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video) | |||
841 | static int acpi_video_bus_check(struct acpi_video_bus *video) | 845 | static int acpi_video_bus_check(struct acpi_video_bus *video) |
842 | { | 846 | { |
843 | acpi_status status = -ENOENT; | 847 | acpi_status status = -ENOENT; |
844 | 848 | struct device *dev; | |
845 | 849 | ||
846 | if (!video) | 850 | if (!video) |
847 | return -EINVAL; | 851 | return -EINVAL; |
848 | 852 | ||
853 | dev = acpi_get_physical_pci_device(video->device->handle); | ||
854 | if (!dev) | ||
855 | return -ENODEV; | ||
856 | put_device(dev); | ||
857 | |||
849 | /* Since there is no HID, CID and so on for VGA driver, we have | 858 | /* Since there is no HID, CID and so on for VGA driver, we have |
850 | * to check well known required nodes. | 859 | * to check well known required nodes. |
851 | */ | 860 | */ |