]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: utils: Introduce acpi_dev_get_first_match_name()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 5 Jan 2018 16:09:33 +0000 (18:09 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Jan 2018 23:41:43 +0000 (00:41 +0100)
commitc926b07620e618faa9ced6cc9e53d68aff7b5f20
tree3f4eaa7009cdf208646d0d7362ec8773c1ba6bf6
parent27dfe35f3d23ec6f3c79325565f99021f3f8a04f
ACPI: utils: Introduce acpi_dev_get_first_match_name()

Sometimes the user wants to have device name of the match rather than
just checking if device present or not. To make life easier for such
users introduce acpi_dev_get_first_match_name() helper based on code
for acpi_dev_present().

For example, GPIO driver for Intel Merrifield needs to know the device
name of pin control to be able to apply GPIO mapping table to the proper
device.

To be more consistent with the purpose rename

  struct acpi_dev_present_info  -> struct acpi_dev_match_info
  acpi_dev_present_cb()         -> acpi_dev_match_cb()

in the utils.c file.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/utils.c
include/acpi/acpi_bus.h
include/linux/acpi.h