ACPI / scan: Allow ACPI drivers to bind to PNP device objects
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Aug 2014 23:29:21 +0000 (01:29 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Aug 2014 23:29:21 +0000 (01:29 +0200)
commitfc2e0a8326d1b21d11ef8213298e5302867fed2c
tree3270e1635693c522da526720d4c3192b54aa710b
parent52addcf9d6669fa439387610bc65c92fa0980cef
ACPI / scan: Allow ACPI drivers to bind to PNP device objects

We generally don't allow ACPI drivers to bind to ACPI device objects
that companion "physical" device objects are created for to avoid
situations in which two different drivers may attempt to handle one
device at the same time.  Recent ACPI device enumeration rework
extended that approach to ACPI PNP devices by starting to use a scan
handler for enumerating them.  However, we previously allowed ACPI
drivers to bind to ACPI device objects with existing PNP device
companions and changing that led to functional regressions on some
systems.

For this reason, add a special check for PNP devices in
acpi_device_probe() so that ACPI drivers can bind to ACPI device
objects having existing PNP device companions as before.

Fixes: eec15edbb0e1 (ACPI / PNP: use device ID list for PNPACPI device enumeration)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=81511
Link: https://bugzilla.kernel.org/show_bug.cgi?id=81971
Reported-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Reported-by: Dirk Griesbach <spamthis@freenet.de>
Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c