ACPI: proc_dir_entry 'video/VGA' already registered
authorZhao Yakui <yakui.zhao@intel.com>
Tue, 3 Feb 2009 03:55:01 +0000 (22:55 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Feb 2009 17:50:33 +0000 (09:50 -0800)
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

index baaff815bbc111d358231b2a80c4f154027944c3..9bf8f86f536d02763ad2ace4c8c8f8ebb0af503f 100644 (file)
@@ -1991,6 +1991,12 @@ static int acpi_video_bus_add(struct acpi_device *device)
                        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);