diff mbox

[02/27] gpiolib-acpi: convert acpi_evaluate_object() to acpi_execute_simple_method()

Message ID 1378168335-22556-3-git-send-email-rui.zhang@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Zhang, Rui Sept. 3, 2013, 12:31 a.m. UTC
acpi_execute_simple_method() is a new ACPI API introduced to invoke
an ACPI control method that has single integer parameter and no return value.

Convert acpi_evaluate_object() to acpi_execute_simple_method()
in drivers/gpio/gpiolib-acpi.c

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
CC: Mathias Nyman <mathias.nyman@linux.intel.com>
CC: Mika Westerberg <mika.westerberg@linux.intel.com>
CC: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib-acpi.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Mika Westerberg Sept. 3, 2013, 7:17 a.m. UTC | #1
On Tue, Sep 03, 2013 at 08:31:50AM +0800, Zhang Rui wrote:
> acpi_execute_simple_method() is a new ACPI API introduced to invoke
> an ACPI control method that has single integer parameter and no return value.
> 
> Convert acpi_evaluate_object() to acpi_execute_simple_method()
> in drivers/gpio/gpiolib-acpi.c
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> CC: Mathias Nyman <mathias.nyman@linux.intel.com>
> CC: Mika Westerberg <mika.westerberg@linux.intel.com>

Nice!

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mathias Nyman Sept. 3, 2013, 7:42 a.m. UTC | #2
On 09/03/2013 03:31 AM, Zhang Rui wrote:
> acpi_execute_simple_method() is a new ACPI API introduced to invoke
> an ACPI control method that has single integer parameter and no return value.
>
> Convert acpi_evaluate_object() to acpi_execute_simple_method()
> in drivers/gpio/gpiolib-acpi.c
>
> Signed-off-by: Zhang Rui<rui.zhang@intel.com>
> CC: Mathias Nyman<mathias.nyman@linux.intel.com>
> CC: Mika Westerberg<mika.westerberg@linux.intel.com>
> CC: Linus Walleij<linus.walleij@linaro.org>
> ---
>   drivers/gpio/gpiolib-acpi.c | 9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 5c1ef2b..f2beb72 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -73,15 +73,8 @@ static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)
>   static irqreturn_t acpi_gpio_irq_handler_evt(int irq, void *data)
>   {
>   	struct acpi_gpio_evt_pin *evt_pin = data;
> -	struct acpi_object_list args;
> -	union acpi_object arg;
>
> -	arg.type = ACPI_TYPE_INTEGER;
> -	arg.integer.value = evt_pin->pin;
> -	args.count = 1;
> -	args.pointer =&arg;
> -
> -	acpi_evaluate_object(evt_pin->evt_handle, NULL,&args, NULL);
> +	acpi_execute_simple_method(evt_pin->evt_handle, NULL, evt_pin->pin);
>
>   	return IRQ_HANDLED;
>   }


Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Sept. 17, 2013, 12:55 p.m. UTC | #3
On Tue, Sep 3, 2013 at 2:31 AM, Zhang Rui <rui.zhang@intel.com> wrote:

> acpi_execute_simple_method() is a new ACPI API introduced to invoke
> an ACPI control method that has single integer parameter and no return value.
>
> Convert acpi_evaluate_object() to acpi_execute_simple_method()
> in drivers/gpio/gpiolib-acpi.c
>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> CC: Mathias Nyman <mathias.nyman@linux.intel.com>
> CC: Mika Westerberg <mika.westerberg@linux.intel.com>
> CC: Linus Walleij <linus.walleij@linaro.org>

Patch applied with Mathias and Mika's ACKs!

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 5c1ef2b..f2beb72 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -73,15 +73,8 @@  static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)
 static irqreturn_t acpi_gpio_irq_handler_evt(int irq, void *data)
 {
 	struct acpi_gpio_evt_pin *evt_pin = data;
-	struct acpi_object_list args;
-	union acpi_object arg;
 
-	arg.type = ACPI_TYPE_INTEGER;
-	arg.integer.value = evt_pin->pin;
-	args.count = 1;
-	args.pointer = &arg;
-
-	acpi_evaluate_object(evt_pin->evt_handle, NULL, &args, NULL);
+	acpi_execute_simple_method(evt_pin->evt_handle, NULL, evt_pin->pin);
 
 	return IRQ_HANDLED;
 }