aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-01-19 09:35:04 -0500
committerJiri Kosina <jkosina@suse.cz>2018-02-16 07:19:12 -0500
commit8afede123bc15417656890ac3aafac3f2d6539a4 (patch)
tree89b926b23bca4c6ac695142ad941dfd5bf55dcd5 /drivers/hid
parent183b6366cf473ff0e706a6751adc082faa44843d (diff)
HID: i2c-hid: Use ACPI_COMPANION() directly
Instead of doing additional checks and functional calls, just get ACPI companion device directly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 7230243b94d3..0d3ca542e987 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -891,10 +891,10 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
891 891
892static void i2c_hid_acpi_fix_up_power(struct device *dev) 892static void i2c_hid_acpi_fix_up_power(struct device *dev)
893{ 893{
894 acpi_handle handle = ACPI_HANDLE(dev);
895 struct acpi_device *adev; 894 struct acpi_device *adev;
896 895
897 if (handle && acpi_bus_get_device(handle, &adev) == 0) 896 adev = ACPI_COMPANION(dev);
897 if (adev)
898 acpi_device_fix_up_power(adev); 898 acpi_device_fix_up_power(adev);
899} 899}
900 900