ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers

modpost is going to use these to create e.g. acpi:ACPI0001
in modules.alias.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index f15a58f..fa80f35 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -411,12 +411,13 @@
 
 	sprintf(ibm->acpi->driver->name, "%s_%s", IBM_NAME, ibm->name);
 	ibm->acpi->driver->ids = ibm->acpi->hid;
+
 	ibm->acpi->driver->ops.add = &tpacpi_device_add;
 
 	rc = acpi_bus_register_driver(ibm->acpi->driver);
 	if (rc < 0) {
 		printk(IBM_ERR "acpi_bus_register_driver(%s) failed: %d\n",
-		       ibm->acpi->hid, rc);
+		       ibm->name, rc);
 		kfree(ibm->acpi->driver);
 		ibm->acpi->driver = NULL;
 	} else if (!rc)
@@ -1316,8 +1317,13 @@
 	return res;
 }
 
+static const struct acpi_device_id ibm_htk_device_ids[] = {
+	{IBM_HKEY_HID, 0},
+	{"", 0},
+};
+
 static struct tp_acpi_drv_struct ibm_hotkey_acpidriver = {
-	.hid = IBM_HKEY_HID,
+	.hid = ibm_htk_device_ids,
 	.notify = hotkey_notify,
 	.handle = &hkey_handle,
 	.type = ACPI_DEVICE_NOTIFY,
@@ -2080,6 +2086,11 @@
 /* don't list other alternatives as we install a notify handler on the 570 */
 IBM_HANDLE(pci, root, "\\_SB.PCI");	/* 570 */
 
+static const struct acpi_device_id ibm_pci_device_ids[] = {
+	{PCI_ROOT_HID_STRING, 0},
+	{"", 0},
+};
+
 static struct tp_acpi_drv_struct ibm_dock_acpidriver[2] = {
 	{
 	 .notify = dock_notify,
@@ -2090,7 +2101,7 @@
 	/* THIS ONE MUST NEVER BE USED FOR DRIVER AUTOLOADING.
 	 * We just use it to get notifications of dock hotplug
 	 * in very old thinkpads */
-	 .hid = PCI_ROOT_HID_STRING,
+	 .hid = ibm_pci_device_ids,
 	 .notify = dock_notify,
 	 .handle = &pci_handle,
 	 .type = ACPI_SYSTEM_NOTIFY,
@@ -2149,7 +2160,8 @@
 static void dock_notify(struct ibm_struct *ibm, u32 event)
 {
 	int docked = dock_docked();
-	int pci = ibm->acpi->hid && strstr(ibm->acpi->hid, PCI_ROOT_HID_STRING);
+	int pci = ibm->acpi->hid && ibm->acpi->device &&
+		acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids);
 
 	if (event == 1 && !pci)	/* 570 */
 		acpi_bus_generate_event(ibm->acpi->device, event, 1);	/* button */