aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_bind.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2006-12-07 07:57:10 -0500
committerLen Brown <len.brown@intel.com>2006-12-15 23:38:35 -0500
commitae8433324be16673c75951986dcf85f29c090557 (patch)
treec762438e6d685f3f106a5c2bc9fc93246bfb47ff /drivers/acpi/pci_bind.c
parentdb3e1cc3257758d8a694d0a6ab29f109fb019853 (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/pci_bind.c')
-rw-r--r--drivers/acpi/pci_bind.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index d83327468358..aa05e92464e6 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -379,32 +379,16 @@ acpi_pci_bind_root(struct acpi_device *device,
379 379
380static int acpi_pci_bridge_add(struct acpi_device *device); 380static int acpi_pci_bridge_add(struct acpi_device *device);
381static int acpi_pci_bridge_remove(struct acpi_device *device, int type); 381static int acpi_pci_bridge_remove(struct acpi_device *device, int type);
382static int acpi_pci_bridge_match(struct acpi_device *device, 382
383 struct acpi_driver *driver);
384static struct acpi_driver acpi_pci_bridge_driver = { 383static struct acpi_driver acpi_pci_bridge_driver = {
385 .name = ACPI_PCI_BRIDGE_DRIVER_NAME, 384 .name = ACPI_PCI_BRIDGE_DRIVER_NAME,
385 .ids = ACPI_PCI_BRIDGE_HID,
386 .ops = { 386 .ops = {
387 .add = acpi_pci_bridge_add, 387 .add = acpi_pci_bridge_add,
388 .remove = acpi_pci_bridge_remove, 388 .remove = acpi_pci_bridge_remove,
389 .match = acpi_pci_bridge_match,
390 }, 389 },
391}; 390};
392 391
393static int acpi_pci_bridge_match(struct acpi_device *device,
394 struct acpi_driver *driver)
395{
396 acpi_status status;
397 acpi_handle handle;
398
399 /* pci bridge has _PRT but isn't PNP0A03 */
400 status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
401 if (ACPI_FAILURE(status))
402 return -ENODEV;
403 if (!acpi_match_ids(device, "PNP0A03"))
404 return -ENODEV;
405 return 0;
406}
407
408static int acpi_pci_bridge_add(struct acpi_device *device) 392static int acpi_pci_bridge_add(struct acpi_device *device)
409{ 393{
410 return acpi_pci_bind(device); 394 return acpi_pci_bind(device);