diff options
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 6597c2a37c36..2097c399dd06 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -739,7 +739,8 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
739 | device->cap._DSS = 1; | 739 | device->cap._DSS = 1; |
740 | } | 740 | } |
741 | 741 | ||
742 | max_level = acpi_video_init_brightness(device); | 742 | if (acpi_video_backlight_support()) |
743 | max_level = acpi_video_init_brightness(device); | ||
743 | 744 | ||
744 | if (device->cap._BCL && device->cap._BCM && max_level > 0) { | 745 | if (device->cap._BCL && device->cap._BCM && max_level > 0) { |
745 | int result; | 746 | int result; |
@@ -785,18 +786,21 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
785 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 786 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
786 | 787 | ||
787 | } | 788 | } |
788 | if (device->cap._DCS && device->cap._DSS){ | 789 | |
789 | static int count = 0; | 790 | if (acpi_video_display_switch_support()) { |
790 | char *name; | 791 | |
791 | name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); | 792 | if (device->cap._DCS && device->cap._DSS) { |
792 | if (!name) | 793 | static int count; |
793 | return; | 794 | char *name; |
794 | sprintf(name, "acpi_video%d", count++); | 795 | name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); |
795 | device->output_dev = video_output_register(name, | 796 | if (!name) |
796 | NULL, device, &acpi_output_properties); | 797 | return; |
797 | kfree(name); | 798 | sprintf(name, "acpi_video%d", count++); |
799 | device->output_dev = video_output_register(name, | ||
800 | NULL, device, &acpi_output_properties); | ||
801 | kfree(name); | ||
802 | } | ||
798 | } | 803 | } |
799 | return; | ||
800 | } | 804 | } |
801 | 805 | ||
802 | /* | 806 | /* |