Re: [PATCH v1] i2c-hid: Use ACPI_COMPANION() directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 19 Jan 2018, Andy Shevchenko wrote:

> Instead of doing additional checks and functional calls,
> just get ACPI companion device directly.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/hid/i2c-hid/i2c-hid.c | 4 ++--
>  1 file 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,
>  
>  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);
>  }

Applied to for-4.17/hid-i2c. Thanks,

-- 
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux