From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Alexandre Courbot <gnurou@gmail.com>,
Lan Tianyu <tianyu.lan@intel.com>, Lv Zheng <lv.zheng@intel.com>,
Alan Cox <alan.cox@intel.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH v2 3/5] gpio / ACPI: Rename acpi_gpio_evt_pin to acpi_gpio_event
Date: Mon, 10 Mar 2014 14:54:52 +0200 [thread overview]
Message-ID: <1394456094-21671-4-git-send-email-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <1394456094-21671-1-git-send-email-mika.westerberg@linux.intel.com>
In order to consolidate _Exx, _Lxx and _EVT to use the same structure make
the structure name to reflect that we are dealing with any event, not just
_EVT.
This is just rename, no functional changes.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/gpio/gpiolib-acpi.c | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 5c0cf1d76c8b..be09e7526890 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -19,16 +19,16 @@
#include "gpiolib.h"
-struct acpi_gpio_evt_pin {
+struct acpi_gpio_event {
struct list_head node;
- acpi_handle *evt_handle;
+ acpi_handle handle;
unsigned int pin;
unsigned int irq;
};
struct acpi_gpio_chip {
struct gpio_chip *chip;
- struct list_head evt_pins;
+ struct list_head events;
};
static int acpi_gpiochip_find(struct gpio_chip *gc, void *data)
@@ -79,9 +79,9 @@ 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_gpio_event *event = data;
- acpi_execute_simple_method(evt_pin->evt_handle, NULL, evt_pin->pin);
+ acpi_execute_simple_method(event->handle, NULL, event->pin);
return IRQ_HANDLED;
}
@@ -119,7 +119,7 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *acpi_gpio)
if (!handle)
return;
- INIT_LIST_HEAD(&acpi_gpio->evt_pins);
+ INIT_LIST_HEAD(&acpi_gpio->events);
/*
* If a GPIO interrupt has an ACPI event handler method, or _EVT is
@@ -157,22 +157,22 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *acpi_gpio)
}
}
if (!handler) {
- struct acpi_gpio_evt_pin *evt_pin;
+ struct acpi_gpio_event *event;
status = acpi_get_handle(handle, "_EVT", &evt_handle);
if (ACPI_FAILURE(status))
continue
- evt_pin = kzalloc(sizeof(*evt_pin), GFP_KERNEL);
- if (!evt_pin)
+ event = kzalloc(sizeof(*event), GFP_KERNEL);
+ if (!event)
continue;
- list_add_tail(&evt_pin->node, &acpi_gpio->evt_pins);
- evt_pin->evt_handle = evt_handle;
- evt_pin->pin = pin;
- evt_pin->irq = irq;
+ list_add_tail(&event->node, &acpi_gpio->events);
+ event->handle = evt_handle;
+ event->pin = pin;
+ event->irq = irq;
handler = acpi_gpio_irq_handler_evt;
- data = evt_pin;
+ data = event;
}
if (!handler)
continue;
@@ -199,17 +199,16 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *acpi_gpio)
*/
static void acpi_gpiochip_free_interrupts(struct acpi_gpio_chip *acpi_gpio)
{
- struct acpi_gpio_evt_pin *evt_pin, *ep;
+ struct acpi_gpio_event *event, *ep;
struct gpio_chip *chip = acpi_gpio->chip;
if (!chip->dev || !chip->to_irq)
return;
- list_for_each_entry_safe_reverse(evt_pin, ep, &acpi_gpio->evt_pins,
- node) {
- devm_free_irq(chip->dev, evt_pin->irq, evt_pin);
- list_del(&evt_pin->node);
- kfree(evt_pin);
+ list_for_each_entry_safe_reverse(event, ep, &acpi_gpio->events, node) {
+ devm_free_irq(chip->dev, event->irq, event);
+ list_del(&event->node);
+ kfree(event);
}
}
--
1.9.0
next prev parent reply other threads:[~2014-03-10 12:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 12:54 [PATCH v2 0/5] gpio / ACPI: Rework ACPI GPIO events and add support for operation regions Mika Westerberg
2014-03-10 12:54 ` [PATCH v2 1/5] gpiolib: Allow GPIO chips to request their own GPIOs Mika Westerberg
2014-03-13 4:46 ` Alexandre Courbot
2014-03-10 12:54 ` [PATCH v2 2/5] gpio / ACPI: Allocate ACPI specific data directly in acpi_gpiochip_add() Mika Westerberg
2014-03-10 12:54 ` Mika Westerberg [this message]
2014-03-10 12:54 ` [PATCH v2 4/5] gpio / ACPI: Rework ACPI GPIO event handling Mika Westerberg
2014-03-10 12:54 ` [PATCH v2 5/5] gpio / ACPI: Add support for ACPI GPIO operation regions Mika Westerberg
2014-03-13 14:32 ` Linus Walleij
2014-03-13 15:05 ` Cox, Alan
2014-03-14 10:50 ` Linus Walleij
2014-03-13 15:18 ` Mika Westerberg
2014-03-14 10:53 ` Linus Walleij
2014-03-14 11:11 ` Mika Westerberg
2014-03-14 15:58 ` [PATCH v3 " Mika Westerberg
2014-03-14 16:25 ` Linus Walleij
2014-03-17 9:44 ` Mika Westerberg
2014-03-13 14:17 ` [PATCH v2 0/5] gpio / ACPI: Rework ACPI GPIO events and add support for " Linus Walleij
2014-03-13 17:14 ` Mika Westerberg
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=1394456094-21671-4-git-send-email-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=alan.cox@intel.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=mathias.nyman@linux.intel.com \
--cc=rjw@rjwysocki.net \
--cc=tianyu.lan@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