ACPI / scan: Take the PRP0001 position in the list of IDs into account
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 10 Apr 2015 14:07:51 +0000 (16:07 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 10 Apr 2015 14:07:51 +0000 (16:07 +0200)
commit2b9c698efa58bf7d9a0d3d3b28115cf9e55ca818
tree79071b3738d15a72e3db576561be744bebbf1e19
parente1acdeb0e7707f4220aa14ad6739102ba26e07c0
ACPI / scan: Take the PRP0001 position in the list of IDs into account

If the special PRP0001 device ID is present in a device's _CID list,
it should not prevent any ACPI/PNP IDs preceding it in the device's
list of identifiers from being matched first.  That is, only if none
of the IDs preceding PRP0001 in the device's PNP/ACPI IDs list
matches the IDs recognized by the driver, the driver's list of
"compatible" IDs should be matched against the device's "compatible"
property, if present.

In addition to that, drivers can provide both acpi_match_table and
of_match_table at the same time and the of_compatible matching
should be used in that case too if PRP0001 is present in the
device's list of identifiers.

To make that happen, rework acpi_driver_match_device() to do the
"compatible" property check in addition to matching the driver's
list of ACPI IDs against the device's one.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/acpi/scan.c