]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / PNP: do ACPI binding directly
authorZhang Rui <rui.zhang@intel.com>
Mon, 7 Jul 2014 12:07:38 +0000 (14:07 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Jul 2014 12:07:38 +0000 (14:07 +0200)
commitecd37df16c7e78a28a3e21e892c364bec379f896
tree526bd85e432bd8b9dcbe8d132f0d3e2dbb854c5b
parent764bc268679c6c5e049dcce83c6d7daa814af968
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>
drivers/acpi/internal.h
drivers/pnp/pnpacpi/core.c
include/acpi/acpi_bus.h