diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-30 04:21:52 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-30 16:04:35 +0200 |
commit | aca0a4eb4e325914ddb22a8ed06fcb0222da2a26 (patch) | |
tree | 5f7aafa1c328c72f41c0cc99c21935870cb6f926 /drivers | |
parent | 52d1d0b12beaf98b6d144d7d1b24eb96cfea60f6 (diff) | |
download | linux-aca0a4eb4e325914ddb22a8ed06fcb0222da2a26.tar.gz linux-aca0a4eb4e325914ddb22a8ed06fcb0222da2a26.tar.bz2 linux-aca0a4eb4e325914ddb22a8ed06fcb0222da2a26.zip |
ACPI / scan: .match() callback for ACPI scan handlers
Introduce a .match() callback for ACPI scan handlers to allow them to
use more elaborate matching algorithms if necessary. That is needed
for the upcoming PNP scan handler in particular.
This change is based on a Zhang Rui's prototype.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/scan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index df6e4c924b35..e44438f7917b 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1977,6 +1977,9 @@ static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler, { const struct acpi_device_id *devid; + if (handler->match) + return handler->match(idstr, matchid); + for (devid = handler->ids; devid->id[0]; devid++) if (!strcmp((char *)devid->id, idstr)) { if (matchid) |