diff options
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index f261737636da..bb5ed059114a 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1020,7 +1020,7 @@ acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset) | |||
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | seq_printf(seq, "levels: "); | 1022 | seq_printf(seq, "levels: "); |
1023 | for (i = 0; i < dev->brightness->count; i++) | 1023 | for (i = 2; i < dev->brightness->count; i++) |
1024 | seq_printf(seq, " %d", dev->brightness->levels[i]); | 1024 | seq_printf(seq, " %d", dev->brightness->levels[i]); |
1025 | seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr); | 1025 | seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr); |
1026 | 1026 | ||
@@ -1059,7 +1059,7 @@ acpi_video_device_write_brightness(struct file *file, | |||
1059 | return -EFAULT; | 1059 | return -EFAULT; |
1060 | 1060 | ||
1061 | /* validate through the list of available levels */ | 1061 | /* validate through the list of available levels */ |
1062 | for (i = 0; i < dev->brightness->count; i++) | 1062 | for (i = 2; i < dev->brightness->count; i++) |
1063 | if (level == dev->brightness->levels[i]) { | 1063 | if (level == dev->brightness->levels[i]) { |
1064 | if (ACPI_SUCCESS | 1064 | if (ACPI_SUCCESS |
1065 | (acpi_video_device_lcd_set_level(dev, level))) | 1065 | (acpi_video_device_lcd_set_level(dev, level))) |
@@ -1260,7 +1260,7 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) | |||
1260 | printk(KERN_WARNING PREFIX | 1260 | printk(KERN_WARNING PREFIX |
1261 | "This indicates a BIOS bug. Please contact the manufacturer.\n"); | 1261 | "This indicates a BIOS bug. Please contact the manufacturer.\n"); |
1262 | } | 1262 | } |
1263 | printk("%llx\n", options); | 1263 | printk(KERN_WARNING "%llx\n", options); |
1264 | seq_printf(seq, "can POST: <integrated video>"); | 1264 | seq_printf(seq, "can POST: <integrated video>"); |
1265 | if (options & 2) | 1265 | if (options & 2) |
1266 | seq_printf(seq, " <PCI video>"); | 1266 | seq_printf(seq, " <PCI video>"); |
@@ -1712,7 +1712,7 @@ acpi_video_get_next_level(struct acpi_video_device *device, | |||
1712 | max = max_below = 0; | 1712 | max = max_below = 0; |
1713 | min = min_above = 255; | 1713 | min = min_above = 255; |
1714 | /* Find closest level to level_current */ | 1714 | /* Find closest level to level_current */ |
1715 | for (i = 0; i < device->brightness->count; i++) { | 1715 | for (i = 2; i < device->brightness->count; i++) { |
1716 | l = device->brightness->levels[i]; | 1716 | l = device->brightness->levels[i]; |
1717 | if (abs(l - level_current) < abs(delta)) { | 1717 | if (abs(l - level_current) < abs(delta)) { |
1718 | delta = l - level_current; | 1718 | delta = l - level_current; |
@@ -1722,7 +1722,7 @@ acpi_video_get_next_level(struct acpi_video_device *device, | |||
1722 | } | 1722 | } |
1723 | /* Ajust level_current to closest available level */ | 1723 | /* Ajust level_current to closest available level */ |
1724 | level_current += delta; | 1724 | level_current += delta; |
1725 | for (i = 0; i < device->brightness->count; i++) { | 1725 | for (i = 2; i < device->brightness->count; i++) { |
1726 | l = device->brightness->levels[i]; | 1726 | l = device->brightness->levels[i]; |
1727 | if (l < min) | 1727 | if (l < min) |
1728 | min = l; | 1728 | min = l; |
@@ -2006,6 +2006,12 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
2006 | device->pnp.bus_id[3] = '0' + instance; | 2006 | device->pnp.bus_id[3] = '0' + instance; |
2007 | instance ++; | 2007 | instance ++; |
2008 | } | 2008 | } |
2009 | /* a hack to fix the duplicate name "VGA" problem on Pa 3553 */ | ||
2010 | if (!strcmp(device->pnp.bus_id, "VGA")) { | ||
2011 | if (instance) | ||
2012 | device->pnp.bus_id[3] = '0' + instance; | ||
2013 | instance++; | ||
2014 | } | ||
2009 | 2015 | ||
2010 | video->device = device; | 2016 | video->device = device; |
2011 | strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); | 2017 | strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); |