summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
diff options
context:
space:
mode:
authorZhang Rui2006-12-07 13:57:10 +0100
committerLen Brown2006-12-16 05:38:35 +0100
commitae8433324be16673c75951986dcf85f29c090557 (patch)
treec762438e6d685f3f106a5c2bc9fc93246bfb47ff /drivers/acpi/video.c
parentACPI: Convert ACPI PCI .bind/.unbind to use PCI bridge driver (diff)
downloadkernel-qcow2-linux-ae8433324be16673c75951986dcf85f29c090557.tar.gz
kernel-qcow2-linux-ae8433324be16673c75951986dcf85f29c090557.tar.xz
kernel-qcow2-linux-ae8433324be16673c75951986dcf85f29c090557.zip
ACPI: Set fake hid for non-PNPID ACPI devices
We do this mainly because: 1. hid is used to match ACPI devices and drivers. .match method which is incompatible to driver model can be deleted from acpi_driver.ops then. 2. As the .uevent method mark ACPI drivers by PNPID, fake hid is set to non-PNPID devices so that udev script can load the right ACPI driver by looking for "HWID = " or "COMPTID = ". Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r--drivers/acpi/video.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 56666a982476..6e99eea689c8 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -65,16 +65,14 @@ MODULE_LICENSE("GPL");
static int acpi_video_bus_add(struct acpi_device *device);
static int acpi_video_bus_remove(struct acpi_device *device, int type);
-static int acpi_video_bus_match(struct acpi_device *device,
- struct acpi_driver *driver);
static struct acpi_driver acpi_video_bus = {
.name = ACPI_VIDEO_DRIVER_NAME,
.class = ACPI_VIDEO_CLASS,
+ .ids = ACPI_VIDEO_HID,
.ops = {
.add = acpi_video_bus_add,
.remove = acpi_video_bus_remove,
- .match = acpi_video_bus_match,
},
};
@@ -1774,39 +1772,6 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
return 0;
}
-static int
-acpi_video_bus_match(struct acpi_device *device, struct acpi_driver *driver)
-{
- acpi_handle h_dummy1;
- acpi_handle h_dummy2;
- acpi_handle h_dummy3;
-
-
- if (!device || !driver)
- return -EINVAL;
-
- /* Since there is no HID, CID for ACPI Video drivers, we have
- * to check well known required nodes for each feature we support.
- */
-
- /* Does this device able to support video switching ? */
- if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy1)) &&
- ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy2)))
- return 0;
-
- /* Does this device able to retrieve a video ROM ? */
- if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy1)))
- return 0;
-
- /* Does this device able to configure which video head to be POSTed ? */
- if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy1)) &&
- ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy2)) &&
- ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy3)))
- return 0;
-
- return -ENODEV;
-}
-
static int __init acpi_video_init(void)
{
int result = 0;