HID: i2c-hid: use correct type for ACPI _DSM parameter
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 19 Aug 2013 11:01:17 +0000 (14:01 +0300)
committerJiri Kosina <jkosina@suse.cz>
Tue, 20 Aug 2013 10:25:49 +0000 (12:25 +0200)
ACPI 5.0 specification requires the fourth parameter to the _DSM (Device
Specific Method) to be of type package instead of integer. Failing to do
that we get following warning on the console:

  ACPI Warning: \_SB_.PCI0.I2C1.TPL0._DSM: Argument #4 type mismatch - Found [Integer],
                ACPI requires [Package] (20130517/nsarguments-95)

Fix this by passing an empty package to the _DSM method. The HID over I2C
specification doesn't require any specific values to be passed with this
parameter.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/i2c-hid/i2c-hid.c

index 879b0ed701a3fb4109243a2642857c16518185b8..d2e0eea2bf7975352292b9f95a92c6f8bef0c31f 100644 (file)
@@ -897,8 +897,9 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
        params[1].integer.value = 1;
        params[2].type = ACPI_TYPE_INTEGER;
        params[2].integer.value = 1; /* HID function */
-       params[3].type = ACPI_TYPE_INTEGER;
-       params[3].integer.value = 0;
+       params[3].type = ACPI_TYPE_PACKAGE;
+       params[3].package.count = 0;
+       params[3].package.elements = NULL;
 
        if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DSM", &input, &buf))) {
                dev_err(&client->dev, "device _DSM execution failed\n");