aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
diff options
context:
space:
mode:
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");
65 65
66static int acpi_video_bus_add(struct acpi_device *device); 66static int acpi_video_bus_add(struct acpi_device *device);
67static int acpi_video_bus_remove(struct acpi_device *device, int type); 67static int acpi_video_bus_remove(struct acpi_device *device, int type);
68static int acpi_video_bus_match(struct acpi_device *device,
69 struct acpi_driver *driver);
70 68
71static struct acpi_driver acpi_video_bus = { 69static 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
1777static int
1778acpi_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
1810static int __init acpi_video_init(void) 1775static int __init acpi_video_init(void)
1811{ 1776{
1812 int result = 0; 1777 int result = 0;