Pull bugzilla-8798 into release branch
authorLen Brown <len.brown@intel.com>
Sat, 25 Aug 2007 06:24:03 +0000 (02:24 -0400)
committerLen Brown <len.brown@intel.com>
Sat, 25 Aug 2007 06:24:03 +0000 (02:24 -0400)
drivers/acpi/video.c

index 6659bdd2a454ba4b563697cc2f396e8f91ae9206..3c9bb85a6a93f9465917876a856c42c30e4f15bf 100644 (file)
@@ -1881,6 +1881,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
        return;
 }
 
+static int instance;
 static int acpi_video_bus_add(struct acpi_device *device)
 {
        int result = 0;
@@ -1896,6 +1897,13 @@ static int acpi_video_bus_add(struct acpi_device *device)
        if (!video)
                return -ENOMEM;
 
+       /* a hack to fix the duplicate name "VID" problem on T61 */
+       if (!strcmp(device->pnp.bus_id, "VID")) {
+               if (instance)
+                       device->pnp.bus_id[3] = '0' + instance;
+               instance ++;
+       }
+
        video->device = device;
        strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
        strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);