public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: i2c-hid: use correct type for ACPI _DSM parameter
@ 2013-08-19 11:01 Mika Westerberg
  2013-08-19 13:39 ` Benjamin Tissoires
  0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2013-08-19 11:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jiri Kosina, Benjamin Tissoires, Mika Westerberg

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>
---
 drivers/hid/i2c-hid/i2c-hid.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 879b0ed..d2e0eea 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -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");
-- 
1.8.4.rc2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: i2c-hid: use correct type for ACPI _DSM parameter
  2013-08-19 11:01 [PATCH] HID: i2c-hid: use correct type for ACPI _DSM parameter Mika Westerberg
@ 2013-08-19 13:39 ` Benjamin Tissoires
  2013-08-20 10:27   ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2013-08-19 13:39 UTC (permalink / raw)
  To: Mika Westerberg; +Cc: linux-kernel, Jiri Kosina

On 19/08/13 13:01, Mika Westerberg wrote:
> 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>
> ---

Looks simple and straightforward :)

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: i2c-hid: use correct type for ACPI _DSM parameter
  2013-08-19 13:39 ` Benjamin Tissoires
@ 2013-08-20 10:27   ` Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2013-08-20 10:27 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Mika Westerberg, linux-kernel

On Mon, 19 Aug 2013, Benjamin Tissoires wrote:

> > 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>
> > ---
> 
> Looks simple and straightforward :)
> 
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-20 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-19 11:01 [PATCH] HID: i2c-hid: use correct type for ACPI _DSM parameter Mika Westerberg
2013-08-19 13:39 ` Benjamin Tissoires
2013-08-20 10:27   ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox