]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / scan: do not match drivers against objects having scan handlers
authorAaron Lu <aaron.lu@intel.com>
Tue, 4 Jun 2013 21:02:58 +0000 (23:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 5 Jun 2013 11:11:47 +0000 (13:11 +0200)
commitd2cd3d9f8663f205c411934d60e9b0adaabfc3bb
tree86c265ebf4022c33601f49ecc7dd5b1176e74c7e
parent84202fe511e0326f1d083deb60a93215c85f0ea9
ACPI / scan: do not match drivers against objects having scan handlers

With the introduction of ACPI scan handlers, an ACPI device object
with an ACPI scan handler attached to it must not be bound to an ACPI
driver any more.  Therefore it doesn't make sense to match those
ACPI device objects against a newly registered ACPI driver in
acpi_bus_match(), so make that function return 0 if the device
object passed to it has an ACPI scan handler attached.

This also addresses a regression related to a broken ACPI table in
the BIOS, where it has defined a _ROM method under the PCI root
bridge object.  This causes the video module to treat that object
as a display controller device (since only display devices are
supposed to have a _ROM method defined according to the ACPI spec).
As a result, the ACPI video driver binds to the PCI root bridge
object and overwrites the previously assigned driver_data field of
it, causing subsequent calls to acpi_get_pci_dev() to fail.

[rjw: Subject and changelog]
References: https://bugzilla.kernel.org/show_bug.cgi?id=58091
Reported-by: Jason Cassell <bluesloth600@gmail.com>
Reported-and-bisected-by: Dmitry S. Demin <dmitryy.demin@gmail.com>
Cc: 3.9+ <stable@kernel.org>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c