aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-07-25 01:36:53 -0400
committerLen Brown <len.brown@intel.com>2007-07-25 01:36:53 -0400
commit323ef30af3a0da47cc761b04b262d98d0fe79126 (patch)
tree37636b25acc557969aee51f1fe3e3cbc7a9760ea /drivers/misc
parentcb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4 (diff)
parent1ba90e3a87c46500623afdc3898573e4a5ebb21b (diff)
Pull auto-load-modules into release branch
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/asus-laptop.c9
-rw-r--r--drivers/misc/sony-laptop.c21
-rw-r--r--drivers/misc/thinkpad_acpi.c20
-rw-r--r--drivers/misc/thinkpad_acpi.h2
4 files changed, 43 insertions, 9 deletions
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 */
199static const struct acpi_device_id asus_device_ids[] = {
200 {"ATK0100", 0},
201 {"", 0},
202};
203MODULE_DEVICE_TABLE(acpi, asus_device_ids);
204
200static int asus_hotk_add(struct acpi_device *device); 205static int asus_hotk_add(struct acpi_device *device);
201static int asus_hotk_remove(struct acpi_device *device, int type); 206static int asus_hotk_remove(struct acpi_device *device, int type);
202static struct acpi_driver asus_hotk_driver = { 207static 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
1127static const struct acpi_device_id sony_device_ids[] = {
1128 {SONY_NC_HID, 0},
1129 {SONY_PIC_HID, 0},
1130 {"", 0},
1131};
1132MODULE_DEVICE_TABLE(acpi, sony_device_ids);
1133
1134static const struct acpi_device_id sony_nc_device_ids[] = {
1135 {SONY_NC_HID, 0},
1136 {"", 0},
1137};
1138
1127static struct acpi_driver sony_nc_driver = { 1139static 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
2485static const struct acpi_device_id sony_pic_device_ids[] = {
2486 {SONY_PIC_HID, 0},
2487 {"", 0},
2488};
2489
2473static struct acpi_driver sony_pic_driver = { 2490static 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
1320static const struct acpi_device_id ibm_htk_device_ids[] = {
1321 {IBM_HKEY_HID, 0},
1322 {"", 0},
1323};
1324
1319static struct tp_acpi_drv_struct ibm_hotkey_acpidriver = { 1325static 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 */
2081IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ 2087IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */
2082 2088
2089static const struct acpi_device_id ibm_pci_device_ids[] = {
2090 {PCI_ROOT_HID_STRING, 0},
2091 {"", 0},
2092};
2093
2083static struct tp_acpi_drv_struct ibm_dock_acpidriver[2] = { 2094static 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)
2149static void dock_notify(struct ibm_struct *ibm, u32 event) 2160static 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);
193struct ibm_struct; 193struct ibm_struct;
194 194
195struct tp_acpi_drv_struct { 195struct 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);