Skip to content

Commit

Permalink
ACPI: work around duplicate name "VID" problem on T61
Browse files Browse the repository at this point in the history
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
/proc/acpi/video/VID1/...

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 <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Zhang Rui authored and Len Brown committed Aug 25, 2007
1 parent 1a8f461 commit e6d9da1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,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;
Expand All @@ -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);
Expand Down

0 comments on commit e6d9da1

Please sign in to comment.