projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
183b636
)
HID: i2c-hid: Use ACPI_COMPANION() directly
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Fri, 19 Jan 2018 14:35:04 +0000
(16:35 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Fri, 16 Feb 2018 12:19:12 +0000
(13:19 +0100)
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>
drivers/hid/i2c-hid/i2c-hid.c
patch
|
blob
|
history
diff --git
a/drivers/hid/i2c-hid/i2c-hid.c
b/drivers/hid/i2c-hid/i2c-hid.c
index 7230243b94d30732f3ba5cf835ec929e99fcfe58..0d3ca542e987f778621efafd11188c8e18226c43 100644
(file)
--- 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);
}