PCI/ACPI: Pass acpi_pci_root to acpi_pci_drivers' add/remove interface

This patch changes .add/.remove interfaces of acpi_pci_driver.
In the current implementation acpi_handle is passed as a parameter
of .add/.remove interface.  However, the acpi_pci_root structure
contains more useful information than just the acpi_handle.  This
enables us to avoid some useless lookups in each acpi_pci_driver.

Note: This changes interfaces used by acpi_pci_register_driver(), an
exported symbol.  This patch updates all the in-kernel users, but any
out-of-kernel acpi_pci_register_driver() users will need updates.

[bhelgaas: changelog]
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Taku Izumi
2012-09-18 15:22:35 +09:00
committed by Bjorn Helgaas
parent d0020f6522
commit 55bfe3c0c5
4 changed files with 19 additions and 16 deletions

View File

@@ -139,8 +139,8 @@ void acpi_pci_irq_disable (struct pci_dev *dev);
struct acpi_pci_driver {
struct list_head node;
int (*add)(acpi_handle handle);
void (*remove)(acpi_handle handle);
int (*add)(struct acpi_pci_root *root);
void (*remove)(struct acpi_pci_root *root);
};
int acpi_pci_register_driver(struct acpi_pci_driver *driver);