summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2014-07-07 14:07:38 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-07 14:07:38 +0200
commitf1b1dc845cb1418b2b0de35491b0da87498ea6a8 (patch)
tree526bd85e432bd8b9dcbe8d132f0d3e2dbb854c5b /include/acpi
parentcd3de83f147601356395b57a8673e9c5ff1e59d1 (diff)
ACPI / PNP: do ACPI binding directly
PNPACPI uses acpi_bus_type to do ACPI binding for the PNPACPI devices. This is overkill because PNPACPI code already knows which ACPI device object to bind during PNPACPI device enumeration. This patch removes acpi_pnp_bus and does the binding by invoking acpi_bind_one() directly after device enumerated. This also fixes a bug in the previous code that some PNPACPI devices failed to be bound because 1. the ACPI device _HID is not pnpid, e.g. "MSFT0001", but its _CID is, e.g. "PNP0303", thus ACPI _CID is used as the pnp device device id. 2. device is bound only if the pnp device id matches the ACPI device _HID. Tested-by: Prigent Christophe <christophe.prigent@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index b5714580801a..4bcbb941bc09 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -487,6 +487,8 @@ struct acpi_bus_type {
};
int register_acpi_bus_type(struct acpi_bus_type *);
int unregister_acpi_bus_type(struct acpi_bus_type *);
+int acpi_bind_one(struct device *dev, struct acpi_device *adev);
+int acpi_unbind_one(struct device *dev);
struct acpi_pci_root {
struct acpi_device * device;