summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-28 00:10:20 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-28 00:10:20 (GMT)
commit8e32e47dbb98fd24e4c541753427a576e6ab5bb3 (patch)
treeae9e3eb57380171a25af431dea1e4665ef9c7abf /drivers/hid
parent959f58544b7f20c92d5eb43d1232c96c15c01bfb (diff)
parent7744da5e90a2782ff0d48628c2cb120efcd300f3 (diff)
downloadlinux-8e32e47dbb98fd24e4c541753427a576e6ab5bb3.tar.xz
Merge branch 'acpi-cleanup'
* acpi-cleanup: (34 commits) ACPI / proc: Remove alarm proc file ACPI: Remove CONFIG_ACPI_PROCFS_POWER and cm_sbsc.c ACPI / SBS: Remove SBS's proc directory ACPI / Battery: Remove battery's proc directory ACP / fan: trivial style cleanup ACPI / processor: remove superfluous pr == NULL checks ACPI / mm: use NUMA_NO_NODE toshiba_acpi: convert acpi_evaluate_object() to acpi_evaluate_integer() intel-smartconnect: convert acpi_evaluate_object() to acpi_evaluate_integer() intel-rst: convert acpi_evaluate_object() to acpi_evaluate_integer() fujitsu-laptop: convert acpi_evaluate_object() to acpi_evaluate_integer() i2c-hid: convert acpi_evaluate_object() to acpi_evaluate_integer() ACPI: dock: convert acpi_evaluate_object() to acpi_evaluate_integer() acpi_processor: convert acpi_evaluate_object() to acpi_evaluate_integer() pnpacpi: convert acpi_get_handle() to acpi_has_method() wmi: convert acpi_get_handle() to acpi_has_method() toshiba_acpi: convert acpi_get_handle() to acpi_has_method() sony-laptop: convert acpi_get_handle() to acpi_has_method() intel_menlow: convert acpi_get_handle() to acpi_has_method() fujitsu-laptop: convert acpi_get_handle() to acpi_has_method() ...
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index c133619..fd7ce37 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -854,10 +854,10 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
0xF7, 0xF6, 0xDF, 0x3C, 0x67, 0x42, 0x55, 0x45,
0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE,
};
- struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
- union acpi_object params[4], *obj;
+ union acpi_object params[4];
struct acpi_object_list input;
struct acpi_device *adev;
+ unsigned long long value;
acpi_handle handle;
handle = ACPI_HANDLE(&client->dev);
@@ -878,22 +878,14 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
params[3].package.count = 0;
params[3].package.elements = NULL;
- if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DSM", &input, &buf))) {
+ if (ACPI_FAILURE(acpi_evaluate_integer(handle, "_DSM", &input,
+ &value))) {
dev_err(&client->dev, "device _DSM execution failed\n");
return -ENODEV;
}
- obj = (union acpi_object *)buf.pointer;
- if (obj->type != ACPI_TYPE_INTEGER) {
- dev_err(&client->dev, "device _DSM returned invalid type: %d\n",
- obj->type);
- kfree(buf.pointer);
- return -EINVAL;
- }
-
- pdata->hid_descriptor_address = obj->integer.value;
+ pdata->hid_descriptor_address = value;
- kfree(buf.pointer);
return 0;
}