Skip to content

Commit 75ba899

Browse files
westeriJiri Kosina
authored andcommitted
HID: i2c-hid: use correct type for ACPI _DSM parameter
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 <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 58c59bc commit 75ba899

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/hid/i2c-hid/i2c-hid.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,8 +897,9 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
897897
params[1].integer.value = 1;
898898
params[2].type = ACPI_TYPE_INTEGER;
899899
params[2].integer.value = 1; /* HID function */
900-
params[3].type = ACPI_TYPE_INTEGER;
901-
params[3].integer.value = 0;
900+
params[3].type = ACPI_TYPE_PACKAGE;
901+
params[3].package.count = 0;
902+
params[3].package.elements = NULL;
902903

903904
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DSM", &input, &buf))) {
904905
dev_err(&client->dev, "device _DSM execution failed\n");

0 commit comments

Comments
 (0)