mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
	linux-gpio@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH 2/2] gpio / ACPI: Use local variable instead of ACPI_HANDLE()
Date: Tue, 10 Mar 2015 23:10:01 +0100	[thread overview]
Message-ID: <15697166.UNaCUJRTg5@vostro.rjw.lan> (raw)
In-Reply-To: <4032246.STUT1iRmIk@vostro.rjw.lan>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

In acpi_gpiochip_request_interrupts() the handle local
variable already contains the value that we want to pass
to acpi_walk_resources(), so it is better to use that
variable instead of evaluating ACPI_HANDLE() once more
for the same device.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/gpio/gpiolib-acpi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-pm/drivers/gpio/gpiolib-acpi.c
===================================================================
--- linux-pm.orig/drivers/gpio/gpiolib-acpi.c
+++ linux-pm/drivers/gpio/gpiolib-acpi.c
@@ -300,7 +300,7 @@ void acpi_gpiochip_request_interrupts(st
 		return;
 
 	INIT_LIST_HEAD(&acpi_gpio->events);
-	acpi_walk_resources(ACPI_HANDLE(chip->dev), "_AEI",
+	acpi_walk_resources(handle, "_AEI",
 			    acpi_gpiochip_request_interrupt, acpi_gpio);
 }
 


  parent reply	other threads:[~2015-03-10 21:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 22:07 [PATCH 0/2] gpio / ACPI: Two minor cleanups related to ACPI_HANDLE() Rafael J. Wysocki
2015-03-10 22:08 ` [PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index() Rafael J. Wysocki
2015-03-11  1:36   ` Hanjun Guo
2015-03-11  8:43   ` Mika Westerberg
2015-03-18  1:33   ` Linus Walleij
2015-03-10 22:10 ` Rafael J. Wysocki [this message]
2015-03-11  8:43   ` [PATCH 2/2] gpio / ACPI: Use local variable instead of ACPI_HANDLE() Mika Westerberg
2015-03-18  1:35   ` Linus Walleij
2015-03-18  1:37 ` [PATCH 0/2] gpio / ACPI: Two minor cleanups related to ACPI_HANDLE() Rafael J. Wysocki
2015-03-18  1:47   ` Alexandre Courbot
2015-03-18 14:37     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15697166.UNaCUJRTg5@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome