[patch 25/56] ACPI: proc_dir_entry video/VGA already registered

Greg KH
2009-02-11T00:36:44Z

[-- Attachment #1: acpi-proc_dir_entry-video-vga-already-registered.patch --]
[-- Type: text/plain, Size: 972 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------

From: Zhao Yakui <yakui.zhao@intel.com>

commit f3b39f1393d5cebe56f43a584ef47efbebd2702c upstream.

eliminate the duplicate the name of "VGA"

http://bugzilla.kernel.org/show_bug.cgi?id=12514

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/acpi/video.c | 6 ++++++
1 file changed, 6 insertions(+)

--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1983,6 +1983,12 @@ static int acpi_video_bus_add(struct acp
device->pnp.bus_id[3] = '0' + instance;
instance ++;
}
+ /* a hack to fix the duplicate name "VGA" problem on Pa 3553 */
+ if (!strcmp(device->pnp.bus_id, "VGA")) {
+ if (instance)
+ device->pnp.bus_id[3] = '0' + instance;
+ instance++;
+ }

video->device = device;
strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);