diff options
author | Zhang Rui <rui.zhang@intel.com> | 2006-12-07 07:57:10 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-15 23:38:35 -0500 |
commit | ae8433324be16673c75951986dcf85f29c090557 (patch) | |
tree | c762438e6d685f3f106a5c2bc9fc93246bfb47ff /drivers/acpi/video.c | |
parent | db3e1cc3257758d8a694d0a6ab29f109fb019853 (diff) |
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.c | 37 |
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"); | |||
65 | 65 | ||
66 | static int acpi_video_bus_add(struct acpi_device *device); | 66 | static int acpi_video_bus_add(struct acpi_device *device); |
67 | static int acpi_video_bus_remove(struct acpi_device *device, int type); | 67 | static int acpi_video_bus_remove(struct acpi_device *device, int type); |
68 | static int acpi_video_bus_match(struct acpi_device *device, | ||
69 | struct acpi_driver *driver); | ||
70 | 68 | ||
71 | static struct acpi_driver acpi_video_bus = { | 69 | static struct acpi_driver acpi_video_bus = { |
72 | .name = ACPI_VIDEO_DRIVER_NAME, | 70 | .name = ACPI_VIDEO_DRIVER_NAME, |
73 | .class = ACPI_VIDEO_CLASS, | 71 | .class = ACPI_VIDEO_CLASS, |
72 | .ids = ACPI_VIDEO_HID, | ||
74 | .ops = { | 73 | .ops = { |
75 | .add = acpi_video_bus_add, | 74 | .add = acpi_video_bus_add, |
76 | .remove = acpi_video_bus_remove, | 75 | .remove = acpi_video_bus_remove, |
77 | .match = acpi_video_bus_match, | ||
78 | }, | 76 | }, |
79 | }; | 77 | }; |
80 | 78 | ||
@@ -1774,39 +1772,6 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) | |||
1774 | return 0; | 1772 | return 0; |
1775 | } | 1773 | } |
1776 | 1774 | ||
1777 | static int | ||
1778 | acpi_video_bus_match(struct acpi_device *device, struct acpi_driver *driver) | ||
1779 | { | ||
1780 | acpi_handle h_dummy1; | ||
1781 | acpi_handle h_dummy2; | ||
1782 | acpi_handle h_dummy3; | ||
1783 | |||
1784 | |||
1785 | if (!device || !driver) | ||
1786 | return -EINVAL; | ||
1787 | |||
1788 | /* Since there is no HID, CID for ACPI Video drivers, we have | ||
1789 | * to check well known required nodes for each feature we support. | ||
1790 | */ | ||
1791 | |||
1792 | /* Does this device able to support video switching ? */ | ||
1793 | if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy1)) && | ||
1794 | ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy2))) | ||
1795 | return 0; | ||
1796 | |||
1797 | /* Does this device able to retrieve a video ROM ? */ | ||
1798 | if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy1))) | ||
1799 | return 0; | ||
1800 | |||
1801 | /* Does this device able to configure which video head to be POSTed ? */ | ||
1802 | if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy1)) && | ||
1803 | ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy2)) && | ||
1804 | ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy3))) | ||
1805 | return 0; | ||
1806 | |||
1807 | return -ENODEV; | ||
1808 | } | ||
1809 | |||
1810 | static int __init acpi_video_init(void) | 1775 | static int __init acpi_video_init(void) |
1811 | { | 1776 | { |
1812 | int result = 0; | 1777 | int result = 0; |