ACPI / bind: Prefer device objects with _STA to those without it
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 9 Sep 2013 21:07:47 +0000 (23:07 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 9 Sep 2013 21:07:47 +0000 (23:07 +0200)
commit11b88ee275ec8590a373396888c2460ee89364d6
tree686b3511a75150080b3b91d18b8fbc87ddfa57ba
parent464c114717ae221202ebdbd9aa216035b4626f18
ACPI / bind: Prefer device objects with _STA to those without it

As reported at https://bugzilla.kernel.org/show_bug.cgi?id=60829,
there still are cases in which do_find_child() doesn't choose the
ACPI device object it is "expected" to choose if there are more such
objects matching one PCI device present.  This particular problem may
be worked around by making do_find_child() return device obejcts witn
_STA whose result indicates that the device is enabled before device
objects without _STA if there's more than one device object to choose
from.

This change doesn't affect the case in which there's only one
matching ACPI device object per PCI device.

References: https://bugzilla.kernel.org/show_bug.cgi?id=60829
Reported-by: Peter Wu <lekensteyn@gmail.com>
Tested-by: Felix Lisczyk <felix.lisczyk@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/glue.c