]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ACPI / bind: Redefine acpi_preset_companion()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 27 Nov 2013 00:54:37 +0000 (01:54 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 27 Nov 2013 00:54:37 +0000 (01:54 +0100)
commit5faef24565078ab46b79d876329a227a92b77925
tree0c5e6687a7b647dab385625b67671e7b6e244607
parent3e742620604fc2e86b167e36994d732fc431cdf6
ACPI / bind: Redefine acpi_preset_companion()

Modify acpi_preset_companion() to take a struct acpi_device pointer
instead of an ACPI handle as its second argument and redefine it as
a static inline wrapper around ACPI_COMPANION_SET() passing the
return value of acpi_find_child_device() directly as the second
argument to it.  Update its users to pass struct acpi_device
pointers instead of ACPI handles to it.

This allows some unnecessary acpi_bus_get_device() calls to be
avoided.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Tested-by: Aaron Lu <aaron.lu@intel.com> # for ATA binding
drivers/acpi/glue.c
drivers/ata/libata-acpi.c
drivers/mmc/core/sdio_bus.c
include/acpi/acpi_bus.h
include/linux/acpi.h