Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8afede12 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jiri Kosina
Browse files

HID: i2c-hid: Use ACPI_COMPANION() directly



Instead of doing additional checks and functional calls,
just get ACPI companion device directly.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 183b6366
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -891,10 +891,10 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,

static void i2c_hid_acpi_fix_up_power(struct device *dev)
{
	acpi_handle handle = ACPI_HANDLE(dev);
	struct acpi_device *adev;

	if (handle && acpi_bus_get_device(handle, &adev) == 0)
	adev = ACPI_COMPANION(dev);
	if (adev)
		acpi_device_fix_up_power(adev);
}