Commit:     e6d9da1de0f31c57cfe3837b1b4e51c6d96fcd3c
Parent:     1a8f46100b657f533ce677e79bc27c6794c91c46
Author:     Zhang Rui <[EMAIL PROTECTED]>
AuthorDate: Sat Aug 25 02:23:31 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sat Aug 25 02:23:31 2007 -0400

    ACPI: work around duplicate name "VID" problem on T61
    This can only fix the problem that more than one video bus device
    have the same AML name "VID".
    ie. the proc I/F for the second "VID" video bus device is located under
    As this is really rare and the ACPI proc I/F is a legacy feature that
    we are planning to remove.
    We won't provide a generic solution for this problem.
    Signed-off-by: Zhang Rui <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
 drivers/acpi/video.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index d987019..ac63be4 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1833,6 +1833,7 @@ static void acpi_video_device_notify(acpi_handle handle, 
u32 event, void *data)
+static int instance;
 static int acpi_video_bus_add(struct acpi_device *device)
        int result = 0;
@@ -1847,6 +1848,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);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to