diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/ac.c | 9 | ||||
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 8 | ||||
-rw-r--r-- | drivers/acpi/asus_acpi.c | 11 | ||||
-rw-r--r-- | drivers/acpi/battery.c | 9 | ||||
-rw-r--r-- | drivers/acpi/button.c | 12 | ||||
-rw-r--r-- | drivers/acpi/container.c | 10 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 8 | ||||
-rw-r--r-- | drivers/acpi/events/evrgnini.c | 2 | ||||
-rw-r--r-- | drivers/acpi/fan.c | 8 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsxfeval.c | 2 | ||||
-rw-r--r-- | drivers/acpi/pci_link.c | 9 | ||||
-rw-r--r-- | drivers/acpi/pci_root.c | 9 | ||||
-rw-r--r-- | drivers/acpi/power.c | 8 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 8 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 10 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 156 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 8 | ||||
-rw-r--r-- | drivers/acpi/utilities/uteval.c | 4 | ||||
-rw-r--r-- | drivers/acpi/video.c | 8 | ||||
-rw-r--r-- | drivers/char/hpet.c | 8 | ||||
-rw-r--r-- | drivers/input/misc/atlas_btns.c | 9 | ||||
-rw-r--r-- | drivers/misc/asus-laptop.c | 9 | ||||
-rw-r--r-- | drivers/misc/sony-laptop.c | 21 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 20 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.h | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 19 |
26 files changed, 296 insertions, 91 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 37c7dc4f9fe5..d8b35093527a 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #define ACPI_AC_COMPONENT 0x00020000 | 35 | #define ACPI_AC_COMPONENT 0x00020000 |
36 | #define ACPI_AC_CLASS "ac_adapter" | 36 | #define ACPI_AC_CLASS "ac_adapter" |
37 | #define ACPI_AC_HID "ACPI0003" | ||
38 | #define ACPI_AC_DEVICE_NAME "AC Adapter" | 37 | #define ACPI_AC_DEVICE_NAME "AC Adapter" |
39 | #define ACPI_AC_FILE_STATE "state" | 38 | #define ACPI_AC_FILE_STATE "state" |
40 | #define ACPI_AC_NOTIFY_STATUS 0x80 | 39 | #define ACPI_AC_NOTIFY_STATUS 0x80 |
@@ -56,10 +55,16 @@ static int acpi_ac_add(struct acpi_device *device); | |||
56 | static int acpi_ac_remove(struct acpi_device *device, int type); | 55 | static int acpi_ac_remove(struct acpi_device *device, int type); |
57 | static int acpi_ac_open_fs(struct inode *inode, struct file *file); | 56 | static int acpi_ac_open_fs(struct inode *inode, struct file *file); |
58 | 57 | ||
58 | const static struct acpi_device_id ac_device_ids[] = { | ||
59 | {"ACPI0003", 0}, | ||
60 | {"", 0}, | ||
61 | }; | ||
62 | MODULE_DEVICE_TABLE(acpi, ac_device_ids); | ||
63 | |||
59 | static struct acpi_driver acpi_ac_driver = { | 64 | static struct acpi_driver acpi_ac_driver = { |
60 | .name = "ac", | 65 | .name = "ac", |
61 | .class = ACPI_AC_CLASS, | 66 | .class = ACPI_AC_CLASS, |
62 | .ids = ACPI_AC_HID, | 67 | .ids = ac_device_ids, |
63 | .ops = { | 68 | .ops = { |
64 | .add = acpi_ac_add, | 69 | .add = acpi_ac_add, |
65 | .remove = acpi_ac_remove, | 70 | .remove = acpi_ac_remove, |
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index e65628a03085..5f1127ad5a95 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -53,10 +53,16 @@ static int acpi_memory_device_add(struct acpi_device *device); | |||
53 | static int acpi_memory_device_remove(struct acpi_device *device, int type); | 53 | static int acpi_memory_device_remove(struct acpi_device *device, int type); |
54 | static int acpi_memory_device_start(struct acpi_device *device); | 54 | static int acpi_memory_device_start(struct acpi_device *device); |
55 | 55 | ||
56 | static const struct acpi_device_id memory_device_ids[] = { | ||
57 | {ACPI_MEMORY_DEVICE_HID, 0}, | ||
58 | {"", 0}, | ||
59 | }; | ||
60 | MODULE_DEVICE_TABLE(acpi, memory_device_ids); | ||
61 | |||
56 | static struct acpi_driver acpi_memory_device_driver = { | 62 | static struct acpi_driver acpi_memory_device_driver = { |
57 | .name = "acpi_memhotplug", | 63 | .name = "acpi_memhotplug", |
58 | .class = ACPI_MEMORY_DEVICE_CLASS, | 64 | .class = ACPI_MEMORY_DEVICE_CLASS, |
59 | .ids = ACPI_MEMORY_DEVICE_HID, | 65 | .ids = memory_device_ids, |
60 | .ops = { | 66 | .ops = { |
61 | .add = acpi_memory_device_add, | 67 | .add = acpi_memory_device_add, |
62 | .remove = acpi_memory_device_remove, | 68 | .remove = acpi_memory_device_remove, |
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 3cd79caad70c..9c4bd220c44f 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #define ACPI_HOTK_NAME "Asus Laptop ACPI Extras Driver" | 56 | #define ACPI_HOTK_NAME "Asus Laptop ACPI Extras Driver" |
57 | #define ACPI_HOTK_CLASS "hotkey" | 57 | #define ACPI_HOTK_CLASS "hotkey" |
58 | #define ACPI_HOTK_DEVICE_NAME "Hotkey" | 58 | #define ACPI_HOTK_DEVICE_NAME "Hotkey" |
59 | #define ACPI_HOTK_HID "ATK0100" | ||
60 | 59 | ||
61 | /* | 60 | /* |
62 | * Some events we use, same for all Asus | 61 | * Some events we use, same for all Asus |
@@ -426,14 +425,20 @@ static struct acpi_table_header *asus_info; | |||
426 | static struct asus_hotk *hotk; | 425 | static struct asus_hotk *hotk; |
427 | 426 | ||
428 | /* | 427 | /* |
429 | * The hotkey driver declaration | 428 | * The hotkey driver and autoloading declaration |
430 | */ | 429 | */ |
431 | static int asus_hotk_add(struct acpi_device *device); | 430 | static int asus_hotk_add(struct acpi_device *device); |
432 | static int asus_hotk_remove(struct acpi_device *device, int type); | 431 | static int asus_hotk_remove(struct acpi_device *device, int type); |
432 | static const struct acpi_device_id asus_device_ids[] = { | ||
433 | {"ATK0100", 0}, | ||
434 | {"", 0}, | ||
435 | }; | ||
436 | MODULE_DEVICE_TABLE(acpi, asus_device_ids); | ||
437 | |||
433 | static struct acpi_driver asus_hotk_driver = { | 438 | static struct acpi_driver asus_hotk_driver = { |
434 | .name = "asus_acpi", | 439 | .name = "asus_acpi", |
435 | .class = ACPI_HOTK_CLASS, | 440 | .class = ACPI_HOTK_CLASS, |
436 | .ids = ACPI_HOTK_HID, | 441 | .ids = asus_device_ids, |
437 | .ops = { | 442 | .ops = { |
438 | .add = asus_hotk_add, | 443 | .add = asus_hotk_add, |
439 | .remove = asus_hotk_remove, | 444 | .remove = asus_hotk_remove, |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index cad932de383d..81651032791b 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -41,7 +41,6 @@ | |||
41 | 41 | ||
42 | #define ACPI_BATTERY_COMPONENT 0x00040000 | 42 | #define ACPI_BATTERY_COMPONENT 0x00040000 |
43 | #define ACPI_BATTERY_CLASS "battery" | 43 | #define ACPI_BATTERY_CLASS "battery" |
44 | #define ACPI_BATTERY_HID "PNP0C0A" | ||
45 | #define ACPI_BATTERY_DEVICE_NAME "Battery" | 44 | #define ACPI_BATTERY_DEVICE_NAME "Battery" |
46 | #define ACPI_BATTERY_NOTIFY_STATUS 0x80 | 45 | #define ACPI_BATTERY_NOTIFY_STATUS 0x80 |
47 | #define ACPI_BATTERY_NOTIFY_INFO 0x81 | 46 | #define ACPI_BATTERY_NOTIFY_INFO 0x81 |
@@ -74,10 +73,16 @@ static int acpi_battery_add(struct acpi_device *device); | |||
74 | static int acpi_battery_remove(struct acpi_device *device, int type); | 73 | static int acpi_battery_remove(struct acpi_device *device, int type); |
75 | static int acpi_battery_resume(struct acpi_device *device); | 74 | static int acpi_battery_resume(struct acpi_device *device); |
76 | 75 | ||
76 | static const struct acpi_device_id battery_device_ids[] = { | ||
77 | {"PNP0C0A", 0}, | ||
78 | {"", 0}, | ||
79 | }; | ||
80 | MODULE_DEVICE_TABLE(acpi, battery_device_ids); | ||
81 | |||
77 | static struct acpi_driver acpi_battery_driver = { | 82 | static struct acpi_driver acpi_battery_driver = { |
78 | .name = "battery", | 83 | .name = "battery", |
79 | .class = ACPI_BATTERY_CLASS, | 84 | .class = ACPI_BATTERY_CLASS, |
80 | .ids = ACPI_BATTERY_HID, | 85 | .ids = battery_device_ids, |
81 | .ops = { | 86 | .ops = { |
82 | .add = acpi_battery_add, | 87 | .add = acpi_battery_add, |
83 | .resume = acpi_battery_resume, | 88 | .resume = acpi_battery_resume, |
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index cb4110b50cd0..540581338ef5 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -66,6 +66,16 @@ MODULE_AUTHOR("Paul Diefenbaugh"); | |||
66 | MODULE_DESCRIPTION("ACPI Button Driver"); | 66 | MODULE_DESCRIPTION("ACPI Button Driver"); |
67 | MODULE_LICENSE("GPL"); | 67 | MODULE_LICENSE("GPL"); |
68 | 68 | ||
69 | static const struct acpi_device_id button_device_ids[] = { | ||
70 | {ACPI_BUTTON_HID_LID, 0}, | ||
71 | {ACPI_BUTTON_HID_SLEEP, 0}, | ||
72 | {ACPI_BUTTON_HID_SLEEPF, 0}, | ||
73 | {ACPI_BUTTON_HID_POWER, 0}, | ||
74 | {ACPI_BUTTON_HID_POWERF, 0}, | ||
75 | {"", 0}, | ||
76 | }; | ||
77 | MODULE_DEVICE_TABLE(acpi, button_device_ids); | ||
78 | |||
69 | static int acpi_button_add(struct acpi_device *device); | 79 | static int acpi_button_add(struct acpi_device *device); |
70 | static int acpi_button_remove(struct acpi_device *device, int type); | 80 | static int acpi_button_remove(struct acpi_device *device, int type); |
71 | static int acpi_button_info_open_fs(struct inode *inode, struct file *file); | 81 | static int acpi_button_info_open_fs(struct inode *inode, struct file *file); |
@@ -74,7 +84,7 @@ static int acpi_button_state_open_fs(struct inode *inode, struct file *file); | |||
74 | static struct acpi_driver acpi_button_driver = { | 84 | static struct acpi_driver acpi_button_driver = { |
75 | .name = "button", | 85 | .name = "button", |
76 | .class = ACPI_BUTTON_CLASS, | 86 | .class = ACPI_BUTTON_CLASS, |
77 | .ids = "button_power,button_sleep,PNP0C0D,PNP0C0C,PNP0C0E", | 87 | .ids = button_device_ids, |
78 | .ops = { | 88 | .ops = { |
79 | .add = acpi_button_add, | 89 | .add = acpi_button_add, |
80 | .remove = acpi_button_remove, | 90 | .remove = acpi_button_remove, |
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 0dd3bf7c0ed1..3c25ec7a1871 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -52,10 +52,18 @@ MODULE_LICENSE("GPL"); | |||
52 | static int acpi_container_add(struct acpi_device *device); | 52 | static int acpi_container_add(struct acpi_device *device); |
53 | static int acpi_container_remove(struct acpi_device *device, int type); | 53 | static int acpi_container_remove(struct acpi_device *device, int type); |
54 | 54 | ||
55 | static const struct acpi_device_id container_device_ids[] = { | ||
56 | {"ACPI0004", 0}, | ||
57 | {"PNP0A05", 0}, | ||
58 | {"PNP0A06", 0}, | ||
59 | {"", 0}, | ||
60 | }; | ||
61 | MODULE_DEVICE_TABLE(acpi, container_device_ids); | ||
62 | |||
55 | static struct acpi_driver acpi_container_driver = { | 63 | static struct acpi_driver acpi_container_driver = { |
56 | .name = "container", | 64 | .name = "container", |
57 | .class = ACPI_CONTAINER_CLASS, | 65 | .class = ACPI_CONTAINER_CLASS, |
58 | .ids = "ACPI0004,PNP0A05,PNP0A06", | 66 | .ids = container_device_ids, |
59 | .ops = { | 67 | .ops = { |
60 | .add = acpi_container_add, | 68 | .add = acpi_container_add, |
61 | .remove = acpi_container_remove, | 69 | .remove = acpi_container_remove, |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 10e851021eca..469f3f57f881 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <acpi/actypes.h> | 41 | #include <acpi/actypes.h> |
42 | 42 | ||
43 | #define ACPI_EC_CLASS "embedded_controller" | 43 | #define ACPI_EC_CLASS "embedded_controller" |
44 | #define ACPI_EC_HID "PNP0C09" | ||
45 | #define ACPI_EC_DEVICE_NAME "Embedded Controller" | 44 | #define ACPI_EC_DEVICE_NAME "Embedded Controller" |
46 | #define ACPI_EC_FILE_INFO "info" | 45 | #define ACPI_EC_FILE_INFO "info" |
47 | 46 | ||
@@ -82,10 +81,15 @@ static int acpi_ec_start(struct acpi_device *device); | |||
82 | static int acpi_ec_stop(struct acpi_device *device, int type); | 81 | static int acpi_ec_stop(struct acpi_device *device, int type); |
83 | static int acpi_ec_add(struct acpi_device *device); | 82 | static int acpi_ec_add(struct acpi_device *device); |
84 | 83 | ||
84 | static const struct acpi_device_id ec_device_ids[] = { | ||
85 | {"PNP0C09", 0}, | ||
86 | {"", 0}, | ||
87 | }; | ||
88 | |||
85 | static struct acpi_driver acpi_ec_driver = { | 89 | static struct acpi_driver acpi_ec_driver = { |
86 | .name = "ec", | 90 | .name = "ec", |
87 | .class = ACPI_EC_CLASS, | 91 | .class = ACPI_EC_CLASS, |
88 | .ids = ACPI_EC_HID, | 92 | .ids = ec_device_ids, |
89 | .ops = { | 93 | .ops = { |
90 | .add = acpi_ec_add, | 94 | .add = acpi_ec_add, |
91 | .remove = acpi_ec_remove, | 95 | .remove = acpi_ec_remove, |
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c index 23ee7bc4a705..b1aaa0e84588 100644 --- a/drivers/acpi/events/evrgnini.c +++ b/drivers/acpi/events/evrgnini.c | |||
@@ -378,7 +378,7 @@ static u8 acpi_ev_match_pci_root_bridge(char *id) | |||
378 | static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) | 378 | static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) |
379 | { | 379 | { |
380 | acpi_status status; | 380 | acpi_status status; |
381 | struct acpi_device_id hid; | 381 | struct acpica_device_id hid; |
382 | struct acpi_compatible_id_list *cid; | 382 | struct acpi_compatible_id_list *cid; |
383 | acpi_native_uint i; | 383 | acpi_native_uint i; |
384 | 384 | ||
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index ec655c539492..c81f6bdb68b8 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
@@ -50,10 +50,16 @@ static int acpi_fan_remove(struct acpi_device *device, int type); | |||
50 | static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state); | 50 | static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state); |
51 | static int acpi_fan_resume(struct acpi_device *device); | 51 | static int acpi_fan_resume(struct acpi_device *device); |
52 | 52 | ||
53 | static const struct acpi_device_id fan_device_ids[] = { | ||
54 | {"PNP0C0B", 0}, | ||
55 | {"", 0}, | ||
56 | }; | ||
57 | MODULE_DEVICE_TABLE(acpi, fan_device_ids); | ||
58 | |||
53 | static struct acpi_driver acpi_fan_driver = { | 59 | static struct acpi_driver acpi_fan_driver = { |
54 | .name = "fan", | 60 | .name = "fan", |
55 | .class = ACPI_FAN_CLASS, | 61 | .class = ACPI_FAN_CLASS, |
56 | .ids = "PNP0C0B", | 62 | .ids = fan_device_ids, |
57 | .ops = { | 63 | .ops = { |
58 | .add = acpi_fan_add, | 64 | .add = acpi_fan_add, |
59 | .remove = acpi_fan_remove, | 65 | .remove = acpi_fan_remove, |
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index be4f2899de74..ab65b2c2560e 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c | |||
@@ -440,7 +440,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, | |||
440 | acpi_status status; | 440 | acpi_status status; |
441 | struct acpi_namespace_node *node; | 441 | struct acpi_namespace_node *node; |
442 | u32 flags; | 442 | u32 flags; |
443 | struct acpi_device_id hid; | 443 | struct acpica_device_id hid; |
444 | struct acpi_compatible_id_list *cid; | 444 | struct acpi_compatible_id_list *cid; |
445 | acpi_native_uint i; | 445 | acpi_native_uint i; |
446 | 446 | ||
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 3448edd61dc4..c9f526e55392 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #define _COMPONENT ACPI_PCI_COMPONENT | 46 | #define _COMPONENT ACPI_PCI_COMPONENT |
47 | ACPI_MODULE_NAME("pci_link"); | 47 | ACPI_MODULE_NAME("pci_link"); |
48 | #define ACPI_PCI_LINK_CLASS "pci_irq_routing" | 48 | #define ACPI_PCI_LINK_CLASS "pci_irq_routing" |
49 | #define ACPI_PCI_LINK_HID "PNP0C0F" | ||
50 | #define ACPI_PCI_LINK_DEVICE_NAME "PCI Interrupt Link" | 49 | #define ACPI_PCI_LINK_DEVICE_NAME "PCI Interrupt Link" |
51 | #define ACPI_PCI_LINK_FILE_INFO "info" | 50 | #define ACPI_PCI_LINK_FILE_INFO "info" |
52 | #define ACPI_PCI_LINK_FILE_STATUS "state" | 51 | #define ACPI_PCI_LINK_FILE_STATUS "state" |
@@ -54,10 +53,16 @@ ACPI_MODULE_NAME("pci_link"); | |||
54 | static int acpi_pci_link_add(struct acpi_device *device); | 53 | static int acpi_pci_link_add(struct acpi_device *device); |
55 | static int acpi_pci_link_remove(struct acpi_device *device, int type); | 54 | static int acpi_pci_link_remove(struct acpi_device *device, int type); |
56 | 55 | ||
56 | static struct acpi_device_id link_device_ids[] = { | ||
57 | {"PNP0C0F", 0}, | ||
58 | {"", 0}, | ||
59 | }; | ||
60 | MODULE_DEVICE_TABLE(acpi, link_device_ids); | ||
61 | |||
57 | static struct acpi_driver acpi_pci_link_driver = { | 62 | static struct acpi_driver acpi_pci_link_driver = { |
58 | .name = "pci_link", | 63 | .name = "pci_link", |
59 | .class = ACPI_PCI_LINK_CLASS, | 64 | .class = ACPI_PCI_LINK_CLASS, |
60 | .ids = ACPI_PCI_LINK_HID, | 65 | .ids = link_device_ids, |
61 | .ops = { | 66 | .ops = { |
62 | .add = acpi_pci_link_add, | 67 | .add = acpi_pci_link_add, |
63 | .remove = acpi_pci_link_remove, | 68 | .remove = acpi_pci_link_remove, |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index ad4145a37786..f14ff1ffab29 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -38,16 +38,21 @@ | |||
38 | #define _COMPONENT ACPI_PCI_COMPONENT | 38 | #define _COMPONENT ACPI_PCI_COMPONENT |
39 | ACPI_MODULE_NAME("pci_root"); | 39 | ACPI_MODULE_NAME("pci_root"); |
40 | #define ACPI_PCI_ROOT_CLASS "pci_bridge" | 40 | #define ACPI_PCI_ROOT_CLASS "pci_bridge" |
41 | #define ACPI_PCI_ROOT_HID "PNP0A03" | ||
42 | #define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge" | 41 | #define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge" |
43 | static int acpi_pci_root_add(struct acpi_device *device); | 42 | static int acpi_pci_root_add(struct acpi_device *device); |
44 | static int acpi_pci_root_remove(struct acpi_device *device, int type); | 43 | static int acpi_pci_root_remove(struct acpi_device *device, int type); |
45 | static int acpi_pci_root_start(struct acpi_device *device); | 44 | static int acpi_pci_root_start(struct acpi_device *device); |
46 | 45 | ||
46 | static struct acpi_device_id root_device_ids[] = { | ||
47 | {"PNP0A03", 0}, | ||
48 | {"", 0}, | ||
49 | }; | ||
50 | MODULE_DEVICE_TABLE(acpi, root_device_ids); | ||
51 | |||
47 | static struct acpi_driver acpi_pci_root_driver = { | 52 | static struct acpi_driver acpi_pci_root_driver = { |
48 | .name = "pci_root", | 53 | .name = "pci_root", |
49 | .class = ACPI_PCI_ROOT_CLASS, | 54 | .class = ACPI_PCI_ROOT_CLASS, |
50 | .ids = ACPI_PCI_ROOT_HID, | 55 | .ids = root_device_ids, |
51 | .ops = { | 56 | .ops = { |
52 | .add = acpi_pci_root_add, | 57 | .add = acpi_pci_root_add, |
53 | .remove = acpi_pci_root_remove, | 58 | .remove = acpi_pci_root_remove, |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 4ffecd179702..57b9a2998fd0 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
@@ -59,10 +59,16 @@ static int acpi_power_remove(struct acpi_device *device, int type); | |||
59 | static int acpi_power_resume(struct acpi_device *device); | 59 | static int acpi_power_resume(struct acpi_device *device); |
60 | static int acpi_power_open_fs(struct inode *inode, struct file *file); | 60 | static int acpi_power_open_fs(struct inode *inode, struct file *file); |
61 | 61 | ||
62 | static struct acpi_device_id power_device_ids[] = { | ||
63 | {ACPI_POWER_HID, 0}, | ||
64 | {"", 0}, | ||
65 | }; | ||
66 | MODULE_DEVICE_TABLE(acpi, power_device_ids); | ||
67 | |||
62 | static struct acpi_driver acpi_power_driver = { | 68 | static struct acpi_driver acpi_power_driver = { |
63 | .name = "power", | 69 | .name = "power", |
64 | .class = ACPI_POWER_CLASS, | 70 | .class = ACPI_POWER_CLASS, |
65 | .ids = ACPI_POWER_HID, | 71 | .ids = power_device_ids, |
66 | .ops = { | 72 | .ops = { |
67 | .add = acpi_power_add, | 73 | .add = acpi_power_add, |
68 | .remove = acpi_power_remove, | 74 | .remove = acpi_power_remove, |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 81aceb5da7c7..498422343f38 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -88,10 +88,16 @@ static int acpi_processor_handle_eject(struct acpi_processor *pr); | |||
88 | extern int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | 88 | extern int acpi_processor_tstate_has_changed(struct acpi_processor *pr); |
89 | 89 | ||
90 | 90 | ||
91 | static const struct acpi_device_id processor_device_ids[] = { | ||
92 | {ACPI_PROCESSOR_HID, 0}, | ||
93 | {"", 0}, | ||
94 | }; | ||
95 | MODULE_DEVICE_TABLE(acpi, processor_device_ids); | ||
96 | |||
91 | static struct acpi_driver acpi_processor_driver = { | 97 | static struct acpi_driver acpi_processor_driver = { |
92 | .name = "processor", | 98 | .name = "processor", |
93 | .class = ACPI_PROCESSOR_CLASS, | 99 | .class = ACPI_PROCESSOR_CLASS, |
94 | .ids = ACPI_PROCESSOR_HID, | 100 | .ids = processor_device_ids, |
95 | .ops = { | 101 | .ops = { |
96 | .add = acpi_processor_add, | 102 | .add = acpi_processor_add, |
97 | .remove = acpi_processor_remove, | 103 | .remove = acpi_processor_remove, |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 974d00ccfe84..7d8e78ea13a5 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #define ACPI_SBS_CLASS "sbs" | 38 | #define ACPI_SBS_CLASS "sbs" |
39 | #define ACPI_AC_CLASS "ac_adapter" | 39 | #define ACPI_AC_CLASS "ac_adapter" |
40 | #define ACPI_BATTERY_CLASS "battery" | 40 | #define ACPI_BATTERY_CLASS "battery" |
41 | #define ACPI_SBS_HID "ACPI0002" | ||
42 | #define ACPI_SBS_DEVICE_NAME "Smart Battery System" | 41 | #define ACPI_SBS_DEVICE_NAME "Smart Battery System" |
43 | #define ACPI_SBS_FILE_INFO "info" | 42 | #define ACPI_SBS_FILE_INFO "info" |
44 | #define ACPI_SBS_FILE_STATE "state" | 43 | #define ACPI_SBS_FILE_STATE "state" |
@@ -124,10 +123,17 @@ static int acpi_sbs_add(struct acpi_device *device); | |||
124 | static int acpi_sbs_remove(struct acpi_device *device, int type); | 123 | static int acpi_sbs_remove(struct acpi_device *device, int type); |
125 | static int acpi_sbs_resume(struct acpi_device *device); | 124 | static int acpi_sbs_resume(struct acpi_device *device); |
126 | 125 | ||
126 | static const struct acpi_device_id sbs_device_ids[] = { | ||
127 | {"ACPI0001", 0}, | ||
128 | {"ACPI0005", 0}, | ||
129 | {"", 0}, | ||
130 | }; | ||
131 | MODULE_DEVICE_TABLE(acpi, sbs_device_ids); | ||
132 | |||
127 | static struct acpi_driver acpi_sbs_driver = { | 133 | static struct acpi_driver acpi_sbs_driver = { |
128 | .name = "sbs", | 134 | .name = "sbs", |
129 | .class = ACPI_SBS_CLASS, | 135 | .class = ACPI_SBS_CLASS, |
130 | .ids = "ACPI0001,ACPI0005", | 136 | .ids = sbs_device_ids, |
131 | .ops = { | 137 | .ops = { |
132 | .add = acpi_sbs_add, | 138 | .add = acpi_sbs_add, |
133 | .remove = acpi_sbs_remove, | 139 | .remove = acpi_sbs_remove, |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 6b3b8a522476..be74347d1354 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -16,7 +16,7 @@ ACPI_MODULE_NAME("scan"); | |||
16 | extern struct acpi_device *acpi_root; | 16 | extern struct acpi_device *acpi_root; |
17 | 17 | ||
18 | #define ACPI_BUS_CLASS "system_bus" | 18 | #define ACPI_BUS_CLASS "system_bus" |
19 | #define ACPI_BUS_HID "ACPI_BUS" | 19 | #define ACPI_BUS_HID "LNXSYBUS" |
20 | #define ACPI_BUS_DEVICE_NAME "System Bus" | 20 | #define ACPI_BUS_DEVICE_NAME "System Bus" |
21 | 21 | ||
22 | static LIST_HEAD(acpi_device_list); | 22 | static LIST_HEAD(acpi_device_list); |
@@ -29,6 +29,62 @@ struct acpi_device_bus_id{ | |||
29 | unsigned int instance_no; | 29 | unsigned int instance_no; |
30 | struct list_head node; | 30 | struct list_head node; |
31 | }; | 31 | }; |
32 | |||
33 | /* | ||
34 | * Creates hid/cid(s) string needed for modalias and uevent | ||
35 | * e.g. on a device with hid:IBM0001 and cid:ACPI0001 you get: | ||
36 | * char *modalias: "acpi:IBM0001:ACPI0001" | ||
37 | */ | ||
38 | int create_modalias(struct acpi_device *acpi_dev, char *modalias, int size){ | ||
39 | |||
40 | int len; | ||
41 | |||
42 | if (!acpi_dev->flags.hardware_id) | ||
43 | return -ENODEV; | ||
44 | |||
45 | len = snprintf(modalias, size, "acpi:%s:", | ||
46 | acpi_dev->pnp.hardware_id); | ||
47 | if (len < 0 || len >= size) | ||
48 | return -EINVAL; | ||
49 | size -= len; | ||
50 | |||
51 | if (acpi_dev->flags.compatible_ids) { | ||
52 | struct acpi_compatible_id_list *cid_list; | ||
53 | int i; | ||
54 | int count; | ||
55 | |||
56 | cid_list = acpi_dev->pnp.cid_list; | ||
57 | for (i = 0; i < cid_list->count; i++) { | ||
58 | count = snprintf(&modalias[len], size, "%s:", | ||
59 | cid_list->id[i].value); | ||
60 | if (count < 0 || count >= size) { | ||
61 | printk(KERN_ERR "acpi: %s cid[%i] exceeds event buffer size", | ||
62 | acpi_dev->pnp.device_name, i); | ||
63 | break; | ||
64 | } | ||
65 | len += count; | ||
66 | size -= count; | ||
67 | } | ||
68 | } | ||
69 | |||
70 | modalias[len] = '\0'; | ||
71 | return len; | ||
72 | } | ||
73 | |||
74 | static ssize_t | ||
75 | acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, char *buf) { | ||
76 | struct acpi_device *acpi_dev = to_acpi_device(dev); | ||
77 | int len; | ||
78 | |||
79 | /* Device has no HID and no CID or string is >1024 */ | ||
80 | len = create_modalias(acpi_dev, buf, 1024); | ||
81 | if (len <= 0) | ||
82 | return 0; | ||
83 | buf[len++] = '\n'; | ||
84 | return len; | ||
85 | } | ||
86 | static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); | ||
87 | |||
32 | static int acpi_eject_operation(acpi_handle handle, int lockable) | 88 | static int acpi_eject_operation(acpi_handle handle, int lockable) |
33 | { | 89 | { |
34 | struct acpi_object_list arg_list; | 90 | struct acpi_object_list arg_list; |
@@ -154,6 +210,12 @@ static int acpi_device_setup_files(struct acpi_device *dev) | |||
154 | goto end; | 210 | goto end; |
155 | } | 211 | } |
156 | 212 | ||
213 | if (dev->flags.hardware_id || dev->flags.compatible_ids){ | ||
214 | result = device_create_file(&dev->dev, &dev_attr_modalias); | ||
215 | if(result) | ||
216 | goto end; | ||
217 | } | ||
218 | |||
157 | /* | 219 | /* |
158 | * If device has _EJ0, 'eject' file is created that is used to trigger | 220 | * If device has _EJ0, 'eject' file is created that is used to trigger |
159 | * hot-removal function from userland. | 221 | * hot-removal function from userland. |
@@ -178,6 +240,9 @@ static void acpi_device_remove_files(struct acpi_device *dev) | |||
178 | if (ACPI_SUCCESS(status)) | 240 | if (ACPI_SUCCESS(status)) |
179 | device_remove_file(&dev->dev, &dev_attr_eject); | 241 | device_remove_file(&dev->dev, &dev_attr_eject); |
180 | 242 | ||
243 | if (dev->flags.hardware_id || dev->flags.compatible_ids) | ||
244 | device_remove_file(&dev->dev, &dev_attr_modalias); | ||
245 | |||
181 | if(dev->flags.hardware_id) | 246 | if(dev->flags.hardware_id) |
182 | device_remove_file(&dev->dev, &dev_attr_hid); | 247 | device_remove_file(&dev->dev, &dev_attr_hid); |
183 | if(dev->handle) | 248 | if(dev->handle) |
@@ -186,6 +251,37 @@ static void acpi_device_remove_files(struct acpi_device *dev) | |||
186 | /* -------------------------------------------------------------------------- | 251 | /* -------------------------------------------------------------------------- |
187 | ACPI Bus operations | 252 | ACPI Bus operations |
188 | -------------------------------------------------------------------------- */ | 253 | -------------------------------------------------------------------------- */ |
254 | |||
255 | int acpi_match_device_ids(struct acpi_device *device, | ||
256 | const struct acpi_device_id *ids) | ||
257 | { | ||
258 | const struct acpi_device_id *id; | ||
259 | |||
260 | if (device->flags.hardware_id) { | ||
261 | for (id = ids; id->id[0]; id++) { | ||
262 | if (!strcmp((char*)id->id, device->pnp.hardware_id)) | ||
263 | return 0; | ||
264 | } | ||
265 | } | ||
266 | |||
267 | if (device->flags.compatible_ids) { | ||
268 | struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; | ||
269 | int i; | ||
270 | |||
271 | for (id = ids; id->id[0]; id++) { | ||
272 | /* compare multiple _CID entries against driver ids */ | ||
273 | for (i = 0; i < cid_list->count; i++) { | ||
274 | if (!strcmp((char*)id->id, | ||
275 | cid_list->id[i].value)) | ||
276 | return 0; | ||
277 | } | ||
278 | } | ||
279 | } | ||
280 | |||
281 | return -ENOENT; | ||
282 | } | ||
283 | EXPORT_SYMBOL(acpi_match_device_ids); | ||
284 | |||
189 | static void acpi_device_release(struct device *dev) | 285 | static void acpi_device_release(struct device *dev) |
190 | { | 286 | { |
191 | struct acpi_device *acpi_dev = to_acpi_device(dev); | 287 | struct acpi_device *acpi_dev = to_acpi_device(dev); |
@@ -219,37 +315,19 @@ static int acpi_bus_match(struct device *dev, struct device_driver *drv) | |||
219 | struct acpi_device *acpi_dev = to_acpi_device(dev); | 315 | struct acpi_device *acpi_dev = to_acpi_device(dev); |
220 | struct acpi_driver *acpi_drv = to_acpi_driver(drv); | 316 | struct acpi_driver *acpi_drv = to_acpi_driver(drv); |
221 | 317 | ||
222 | return !acpi_match_ids(acpi_dev, acpi_drv->ids); | 318 | return !acpi_match_device_ids(acpi_dev, acpi_drv->ids); |
223 | } | 319 | } |
224 | 320 | ||
225 | static int acpi_device_uevent(struct device *dev, char **envp, int num_envp, | 321 | static int acpi_device_uevent(struct device *dev, char **envp, int num_envp, |
226 | char *buffer, int buffer_size) | 322 | char *buffer, int buffer_size) |
227 | { | 323 | { |
228 | struct acpi_device *acpi_dev = to_acpi_device(dev); | 324 | struct acpi_device *acpi_dev = to_acpi_device(dev); |
229 | int i = 0, length = 0, ret = 0; | ||
230 | |||
231 | if (acpi_dev->flags.hardware_id) | ||
232 | ret = add_uevent_var(envp, num_envp, &i, | ||
233 | buffer, buffer_size, &length, | ||
234 | "HWID=%s", acpi_dev->pnp.hardware_id); | ||
235 | if (ret) | ||
236 | return -ENOMEM; | ||
237 | if (acpi_dev->flags.compatible_ids) { | ||
238 | int j; | ||
239 | struct acpi_compatible_id_list *cid_list; | ||
240 | 325 | ||
241 | cid_list = acpi_dev->pnp.cid_list; | 326 | strcpy(buffer, "MODALIAS="); |
242 | 327 | if (create_modalias(acpi_dev, buffer + 9, buffer_size - 9) > 0) { | |
243 | for (j = 0; j < cid_list->count; j++) { | 328 | envp[0] = buffer; |
244 | ret = add_uevent_var(envp, num_envp, &i, buffer, | 329 | envp[1] = NULL; |
245 | buffer_size, &length, "COMPTID=%s", | ||
246 | cid_list->id[j].value); | ||
247 | if (ret) | ||
248 | return -ENOMEM; | ||
249 | } | ||
250 | } | 330 | } |
251 | |||
252 | envp[i] = NULL; | ||
253 | return 0; | 331 | return 0; |
254 | } | 332 | } |
255 | 333 | ||
@@ -543,25 +621,6 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context) | |||
543 | return; | 621 | return; |
544 | } | 622 | } |
545 | 623 | ||
546 | int acpi_match_ids(struct acpi_device *device, char *ids) | ||
547 | { | ||
548 | if (device->flags.hardware_id) | ||
549 | if (strstr(ids, device->pnp.hardware_id)) | ||
550 | return 0; | ||
551 | |||
552 | if (device->flags.compatible_ids) { | ||
553 | struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; | ||
554 | int i; | ||
555 | |||
556 | /* compare multiple _CID entries against driver ids */ | ||
557 | for (i = 0; i < cid_list->count; i++) { | ||
558 | if (strstr(ids, cid_list->id[i].value)) | ||
559 | return 0; | ||
560 | } | ||
561 | } | ||
562 | return -ENOENT; | ||
563 | } | ||
564 | |||
565 | static int acpi_bus_get_perf_flags(struct acpi_device *device) | 624 | static int acpi_bus_get_perf_flags(struct acpi_device *device) |
566 | { | 625 | { |
567 | device->performance.state = ACPI_STATE_UNKNOWN; | 626 | device->performance.state = ACPI_STATE_UNKNOWN; |
@@ -624,6 +683,13 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | |||
624 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 683 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
625 | union acpi_object *package = NULL; | 684 | union acpi_object *package = NULL; |
626 | 685 | ||
686 | struct acpi_device_id button_device_ids[] = { | ||
687 | {"PNP0C0D", 0}, | ||
688 | {"PNP0C0C", 0}, | ||
689 | {"PNP0C0E", 0}, | ||
690 | {"", 0}, | ||
691 | }; | ||
692 | |||
627 | 693 | ||
628 | /* _PRW */ | 694 | /* _PRW */ |
629 | status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer); | 695 | status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer); |
@@ -643,7 +709,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) | |||
643 | 709 | ||
644 | device->wakeup.flags.valid = 1; | 710 | device->wakeup.flags.valid = 1; |
645 | /* Power button, Lid switch always enable wakeup */ | 711 | /* Power button, Lid switch always enable wakeup */ |
646 | if (!acpi_match_ids(device, "PNP0C0D,PNP0C0C,PNP0C0E")) | 712 | if (!acpi_match_device_ids(device, button_device_ids)) |
647 | device->wakeup.flags.run_wake = 1; | 713 | device->wakeup.flags.run_wake = 1; |
648 | 714 | ||
649 | end: | 715 | end: |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 58f1338981bc..5a62de1b7f2a 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -92,10 +92,16 @@ static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file); | |||
92 | static ssize_t acpi_thermal_write_polling(struct file *, const char __user *, | 92 | static ssize_t acpi_thermal_write_polling(struct file *, const char __user *, |
93 | size_t, loff_t *); | 93 | size_t, loff_t *); |
94 | 94 | ||
95 | static const struct acpi_device_id thermal_device_ids[] = { | ||
96 | {ACPI_THERMAL_HID, 0}, | ||
97 | {"", 0}, | ||
98 | }; | ||
99 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); | ||
100 | |||
95 | static struct acpi_driver acpi_thermal_driver = { | 101 | static struct acpi_driver acpi_thermal_driver = { |
96 | .name = "thermal", | 102 | .name = "thermal", |
97 | .class = ACPI_THERMAL_CLASS, | 103 | .class = ACPI_THERMAL_CLASS, |
98 | .ids = ACPI_THERMAL_HID, | 104 | .ids = thermal_device_ids, |
99 | .ops = { | 105 | .ops = { |
100 | .add = acpi_thermal_add, | 106 | .add = acpi_thermal_add, |
101 | .remove = acpi_thermal_remove, | 107 | .remove = acpi_thermal_remove, |
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index f112af433e36..0042b7e78b26 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c | |||
@@ -407,7 +407,7 @@ acpi_ut_copy_id_string(char *destination, char *source, acpi_size max_length) | |||
407 | 407 | ||
408 | acpi_status | 408 | acpi_status |
409 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, | 409 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, |
410 | struct acpi_device_id *hid) | 410 | struct acpica_device_id *hid) |
411 | { | 411 | { |
412 | union acpi_operand_object *obj_desc; | 412 | union acpi_operand_object *obj_desc; |
413 | acpi_status status; | 413 | acpi_status status; |
@@ -609,7 +609,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, | |||
609 | 609 | ||
610 | acpi_status | 610 | acpi_status |
611 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, | 611 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, |
612 | struct acpi_device_id *uid) | 612 | struct acpica_device_id *uid) |
613 | { | 613 | { |
614 | union acpi_operand_object *obj_desc; | 614 | union acpi_operand_object *obj_desc; |
615 | acpi_status status; | 615 | acpi_status status; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 04ea697f72bf..d98701941981 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -74,10 +74,16 @@ MODULE_LICENSE("GPL"); | |||
74 | static int acpi_video_bus_add(struct acpi_device *device); | 74 | static int acpi_video_bus_add(struct acpi_device *device); |
75 | static int acpi_video_bus_remove(struct acpi_device *device, int type); | 75 | static int acpi_video_bus_remove(struct acpi_device *device, int type); |
76 | 76 | ||
77 | static const struct acpi_device_id video_device_ids[] = { | ||
78 | {ACPI_VIDEO_HID, 0}, | ||
79 | {"", 0}, | ||
80 | }; | ||
81 | MODULE_DEVICE_TABLE(acpi, video_device_ids); | ||
82 | |||
77 | static struct acpi_driver acpi_video_bus = { | 83 | static struct acpi_driver acpi_video_bus = { |
78 | .name = "video", | 84 | .name = "video", |
79 | .class = ACPI_VIDEO_CLASS, | 85 | .class = ACPI_VIDEO_CLASS, |
80 | .ids = ACPI_VIDEO_HID, | 86 | .ids = video_device_ids, |
81 | .ops = { | 87 | .ops = { |
82 | .add = acpi_video_bus_add, | 88 | .add = acpi_video_bus_add, |
83 | .remove = acpi_video_bus_remove, | 89 | .remove = acpi_video_bus_remove, |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index ba0e74ad74bb..9a2694e5f8b9 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -1007,9 +1007,15 @@ static int hpet_acpi_remove(struct acpi_device *device, int type) | |||
1007 | return -EINVAL; | 1007 | return -EINVAL; |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | static const struct acpi_device_id hpet_device_ids[] = { | ||
1011 | {"PNP0103", 0}, | ||
1012 | {"", 0}, | ||
1013 | }; | ||
1014 | MODULE_DEVICE_TABLE(acpi, hpet_device_ids); | ||
1015 | |||
1010 | static struct acpi_driver hpet_acpi_driver = { | 1016 | static struct acpi_driver hpet_acpi_driver = { |
1011 | .name = "hpet", | 1017 | .name = "hpet", |
1012 | .ids = "PNP0103", | 1018 | .ids = hpet_device_ids, |
1013 | .ops = { | 1019 | .ops = { |
1014 | .add = hpet_acpi_add, | 1020 | .add = hpet_acpi_add, |
1015 | .remove = hpet_acpi_remove, | 1021 | .remove = hpet_acpi_remove, |
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c index 0acc3a123604..e43e92fd9e23 100644 --- a/drivers/input/misc/atlas_btns.c +++ b/drivers/input/misc/atlas_btns.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #define ACPI_ATLAS_NAME "Atlas ACPI" | 32 | #define ACPI_ATLAS_NAME "Atlas ACPI" |
33 | #define ACPI_ATLAS_CLASS "Atlas" | 33 | #define ACPI_ATLAS_CLASS "Atlas" |
34 | #define ACPI_ATLAS_BUTTON_HID "ASIM0000" | ||
35 | 34 | ||
36 | static struct input_dev *input_dev; | 35 | static struct input_dev *input_dev; |
37 | 36 | ||
@@ -130,10 +129,16 @@ static int atlas_acpi_button_remove(struct acpi_device *device, int type) | |||
130 | return status; | 129 | return status; |
131 | } | 130 | } |
132 | 131 | ||
132 | static const struct acpi_device_id atlas_device_ids[] = { | ||
133 | {"ASIM0000", 0}, | ||
134 | {"", 0}, | ||
135 | }; | ||
136 | MODULE_DEVICE_TABLE(acpi, atlas_device_ids); | ||
137 | |||
133 | static struct acpi_driver atlas_acpi_driver = { | 138 | static struct acpi_driver atlas_acpi_driver = { |
134 | .name = ACPI_ATLAS_NAME, | 139 | .name = ACPI_ATLAS_NAME, |
135 | .class = ACPI_ATLAS_CLASS, | 140 | .class = ACPI_ATLAS_CLASS, |
136 | .ids = ACPI_ATLAS_BUTTON_HID, | 141 | .ids = atlas_device_ids, |
137 | .ops = { | 142 | .ops = { |
138 | .add = atlas_acpi_button_add, | 143 | .add = atlas_acpi_button_add, |
139 | .remove = atlas_acpi_button_remove, | 144 | .remove = atlas_acpi_button_remove, |
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c index 6b89854bd3ff..d0fc4fd212e6 100644 --- a/drivers/misc/asus-laptop.c +++ b/drivers/misc/asus-laptop.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #define ASUS_HOTK_NAME "Asus Laptop Support" | 53 | #define ASUS_HOTK_NAME "Asus Laptop Support" |
54 | #define ASUS_HOTK_CLASS "hotkey" | 54 | #define ASUS_HOTK_CLASS "hotkey" |
55 | #define ASUS_HOTK_DEVICE_NAME "Hotkey" | 55 | #define ASUS_HOTK_DEVICE_NAME "Hotkey" |
56 | #define ASUS_HOTK_HID "ATK0100" | ||
57 | #define ASUS_HOTK_FILE "asus-laptop" | 56 | #define ASUS_HOTK_FILE "asus-laptop" |
58 | #define ASUS_HOTK_PREFIX "\\_SB.ATKD." | 57 | #define ASUS_HOTK_PREFIX "\\_SB.ATKD." |
59 | 58 | ||
@@ -197,12 +196,18 @@ static struct asus_hotk *hotk; | |||
197 | /* | 196 | /* |
198 | * The hotkey driver declaration | 197 | * The hotkey driver declaration |
199 | */ | 198 | */ |
199 | static const struct acpi_device_id asus_device_ids[] = { | ||
200 | {"ATK0100", 0}, | ||
201 | {"", 0}, | ||
202 | }; | ||
203 | MODULE_DEVICE_TABLE(acpi, asus_device_ids); | ||
204 | |||
200 | static int asus_hotk_add(struct acpi_device *device); | 205 | static int asus_hotk_add(struct acpi_device *device); |
201 | static int asus_hotk_remove(struct acpi_device *device, int type); | 206 | static int asus_hotk_remove(struct acpi_device *device, int type); |
202 | static struct acpi_driver asus_hotk_driver = { | 207 | static struct acpi_driver asus_hotk_driver = { |
203 | .name = ASUS_HOTK_NAME, | 208 | .name = ASUS_HOTK_NAME, |
204 | .class = ASUS_HOTK_CLASS, | 209 | .class = ASUS_HOTK_CLASS, |
205 | .ids = ASUS_HOTK_HID, | 210 | .ids = asus_device_ids, |
206 | .ops = { | 211 | .ops = { |
207 | .add = asus_hotk_add, | 212 | .add = asus_hotk_add, |
208 | .remove = asus_hotk_remove, | 213 | .remove = asus_hotk_remove, |
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 303e48ca0e8a..14ee06c8f127 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -1124,10 +1124,22 @@ static int sony_nc_remove(struct acpi_device *device, int type) | |||
1124 | return 0; | 1124 | return 0; |
1125 | } | 1125 | } |
1126 | 1126 | ||
1127 | static const struct acpi_device_id sony_device_ids[] = { | ||
1128 | {SONY_NC_HID, 0}, | ||
1129 | {SONY_PIC_HID, 0}, | ||
1130 | {"", 0}, | ||
1131 | }; | ||
1132 | MODULE_DEVICE_TABLE(acpi, sony_device_ids); | ||
1133 | |||
1134 | static const struct acpi_device_id sony_nc_device_ids[] = { | ||
1135 | {SONY_NC_HID, 0}, | ||
1136 | {"", 0}, | ||
1137 | }; | ||
1138 | |||
1127 | static struct acpi_driver sony_nc_driver = { | 1139 | static struct acpi_driver sony_nc_driver = { |
1128 | .name = SONY_NC_DRIVER_NAME, | 1140 | .name = SONY_NC_DRIVER_NAME, |
1129 | .class = SONY_NC_CLASS, | 1141 | .class = SONY_NC_CLASS, |
1130 | .ids = SONY_NC_HID, | 1142 | .ids = sony_nc_device_ids, |
1131 | .owner = THIS_MODULE, | 1143 | .owner = THIS_MODULE, |
1132 | .ops = { | 1144 | .ops = { |
1133 | .add = sony_nc_add, | 1145 | .add = sony_nc_add, |
@@ -2470,10 +2482,15 @@ static int sony_pic_resume(struct acpi_device *device) | |||
2470 | return 0; | 2482 | return 0; |
2471 | } | 2483 | } |
2472 | 2484 | ||
2485 | static const struct acpi_device_id sony_pic_device_ids[] = { | ||
2486 | {SONY_PIC_HID, 0}, | ||
2487 | {"", 0}, | ||
2488 | }; | ||
2489 | |||
2473 | static struct acpi_driver sony_pic_driver = { | 2490 | static struct acpi_driver sony_pic_driver = { |
2474 | .name = SONY_PIC_DRIVER_NAME, | 2491 | .name = SONY_PIC_DRIVER_NAME, |
2475 | .class = SONY_PIC_CLASS, | 2492 | .class = SONY_PIC_CLASS, |
2476 | .ids = SONY_PIC_HID, | 2493 | .ids = sony_pic_device_ids, |
2477 | .owner = THIS_MODULE, | 2494 | .owner = THIS_MODULE, |
2478 | .ops = { | 2495 | .ops = { |
2479 | .add = sony_pic_add, | 2496 | .add = sony_pic_add, |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index f15a58f7403f..fa80f355e522 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -411,12 +411,13 @@ static int __init register_tpacpi_subdriver(struct ibm_struct *ibm) | |||
411 | 411 | ||
412 | sprintf(ibm->acpi->driver->name, "%s_%s", IBM_NAME, ibm->name); | 412 | sprintf(ibm->acpi->driver->name, "%s_%s", IBM_NAME, ibm->name); |
413 | ibm->acpi->driver->ids = ibm->acpi->hid; | 413 | ibm->acpi->driver->ids = ibm->acpi->hid; |
414 | |||
414 | ibm->acpi->driver->ops.add = &tpacpi_device_add; | 415 | ibm->acpi->driver->ops.add = &tpacpi_device_add; |
415 | 416 | ||
416 | rc = acpi_bus_register_driver(ibm->acpi->driver); | 417 | rc = acpi_bus_register_driver(ibm->acpi->driver); |
417 | if (rc < 0) { | 418 | if (rc < 0) { |
418 | printk(IBM_ERR "acpi_bus_register_driver(%s) failed: %d\n", | 419 | printk(IBM_ERR "acpi_bus_register_driver(%s) failed: %d\n", |
419 | ibm->acpi->hid, rc); | 420 | ibm->name, rc); |
420 | kfree(ibm->acpi->driver); | 421 | kfree(ibm->acpi->driver); |
421 | ibm->acpi->driver = NULL; | 422 | ibm->acpi->driver = NULL; |
422 | } else if (!rc) | 423 | } else if (!rc) |
@@ -1316,8 +1317,13 @@ errexit: | |||
1316 | return res; | 1317 | return res; |
1317 | } | 1318 | } |
1318 | 1319 | ||
1320 | static const struct acpi_device_id ibm_htk_device_ids[] = { | ||
1321 | {IBM_HKEY_HID, 0}, | ||
1322 | {"", 0}, | ||
1323 | }; | ||
1324 | |||
1319 | static struct tp_acpi_drv_struct ibm_hotkey_acpidriver = { | 1325 | static struct tp_acpi_drv_struct ibm_hotkey_acpidriver = { |
1320 | .hid = IBM_HKEY_HID, | 1326 | .hid = ibm_htk_device_ids, |
1321 | .notify = hotkey_notify, | 1327 | .notify = hotkey_notify, |
1322 | .handle = &hkey_handle, | 1328 | .handle = &hkey_handle, |
1323 | .type = ACPI_DEVICE_NOTIFY, | 1329 | .type = ACPI_DEVICE_NOTIFY, |
@@ -2080,6 +2086,11 @@ IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */ | |||
2080 | /* don't list other alternatives as we install a notify handler on the 570 */ | 2086 | /* don't list other alternatives as we install a notify handler on the 570 */ |
2081 | IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ | 2087 | IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ |
2082 | 2088 | ||
2089 | static const struct acpi_device_id ibm_pci_device_ids[] = { | ||
2090 | {PCI_ROOT_HID_STRING, 0}, | ||
2091 | {"", 0}, | ||
2092 | }; | ||
2093 | |||
2083 | static struct tp_acpi_drv_struct ibm_dock_acpidriver[2] = { | 2094 | static struct tp_acpi_drv_struct ibm_dock_acpidriver[2] = { |
2084 | { | 2095 | { |
2085 | .notify = dock_notify, | 2096 | .notify = dock_notify, |
@@ -2090,7 +2101,7 @@ static struct tp_acpi_drv_struct ibm_dock_acpidriver[2] = { | |||
2090 | /* THIS ONE MUST NEVER BE USED FOR DRIVER AUTOLOADING. | 2101 | /* THIS ONE MUST NEVER BE USED FOR DRIVER AUTOLOADING. |
2091 | * We just use it to get notifications of dock hotplug | 2102 | * We just use it to get notifications of dock hotplug |
2092 | * in very old thinkpads */ | 2103 | * in very old thinkpads */ |
2093 | .hid = PCI_ROOT_HID_STRING, | 2104 | .hid = ibm_pci_device_ids, |
2094 | .notify = dock_notify, | 2105 | .notify = dock_notify, |
2095 | .handle = &pci_handle, | 2106 | .handle = &pci_handle, |
2096 | .type = ACPI_SYSTEM_NOTIFY, | 2107 | .type = ACPI_SYSTEM_NOTIFY, |
@@ -2149,7 +2160,8 @@ static int __init dock_init2(struct ibm_init_struct *iibm) | |||
2149 | static void dock_notify(struct ibm_struct *ibm, u32 event) | 2160 | static void dock_notify(struct ibm_struct *ibm, u32 event) |
2150 | { | 2161 | { |
2151 | int docked = dock_docked(); | 2162 | int docked = dock_docked(); |
2152 | int pci = ibm->acpi->hid && strstr(ibm->acpi->hid, PCI_ROOT_HID_STRING); | 2163 | int pci = ibm->acpi->hid && ibm->acpi->device && |
2164 | acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids); | ||
2153 | 2165 | ||
2154 | if (event == 1 && !pci) /* 570 */ | 2166 | if (event == 1 && !pci) /* 570 */ |
2155 | acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ | 2167 | acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ |
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index b7a4a888cc8b..88af089d6494 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h | |||
@@ -193,7 +193,7 @@ static void thinkpad_acpi_module_exit(void); | |||
193 | struct ibm_struct; | 193 | struct ibm_struct; |
194 | 194 | ||
195 | struct tp_acpi_drv_struct { | 195 | struct tp_acpi_drv_struct { |
196 | char *hid; | 196 | const struct acpi_device_id *hid; |
197 | struct acpi_driver *driver; | 197 | struct acpi_driver *driver; |
198 | 198 | ||
199 | void (*notify) (struct ibm_struct *, u32); | 199 | void (*notify) (struct ibm_struct *, u32); |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index c37a558ecd96..fcd32ac575c3 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -21,7 +21,10 @@ | |||
21 | 21 | ||
22 | #include <linux/acpi.h> | 22 | #include <linux/acpi.h> |
23 | #include <linux/pnp.h> | 23 | #include <linux/pnp.h> |
24 | #include <linux/mod_devicetable.h> | ||
24 | #include <acpi/acpi_bus.h> | 25 | #include <acpi/acpi_bus.h> |
26 | #include <acpi/actypes.h> | ||
27 | |||
25 | #include "pnpacpi.h" | 28 | #include "pnpacpi.h" |
26 | 29 | ||
27 | static int num = 0; | 30 | static int num = 0; |
@@ -33,15 +36,17 @@ static int num = 0; | |||
33 | * have irqs (PIC, Timer) because we call acpi_register_gsi. | 36 | * have irqs (PIC, Timer) because we call acpi_register_gsi. |
34 | * Finaly only devices that have a CRS method need to be in this list. | 37 | * Finaly only devices that have a CRS method need to be in this list. |
35 | */ | 38 | */ |
36 | static char __initdata excluded_id_list[] = | 39 | static __initdata struct acpi_device_id excluded_id_list[] ={ |
37 | "PNP0C09," /* EC */ | 40 | {"PNP0C09", 0}, /* EC */ |
38 | "PNP0C0F," /* Link device */ | 41 | {"PNP0C0F", 0}, /* Link device */ |
39 | "PNP0000," /* PIC */ | 42 | {"PNP0000", 0}, /* PIC */ |
40 | "PNP0100," /* Timer */ | 43 | {"PNP0100", 0}, /* Timer */ |
41 | ; | 44 | {"", 0}, |
45 | }; | ||
46 | |||
42 | static inline int is_exclusive_device(struct acpi_device *dev) | 47 | static inline int is_exclusive_device(struct acpi_device *dev) |
43 | { | 48 | { |
44 | return (!acpi_match_ids(dev, excluded_id_list)); | 49 | return (!acpi_match_device_ids(dev, excluded_id_list)); |
45 | } | 50 | } |
46 | 51 | ||
47 | /* | 52 | /* |