diff mbox

[v2,1/5] gpiolib / ACPI: move acpi_gpiochip_free_interrupts next to the request function

Message ID 1381392071-21407-2-git-send-email-mika.westerberg@linux.intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Mika Westerberg Oct. 10, 2013, 8:01 a.m. UTC
It makes more sense to have these functions close to each other. No
functional changes.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/gpio/gpiolib-acpi.c | 76 ++++++++++++++++++++++-----------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

Comments

Linus Walleij Oct. 11, 2013, 11 a.m. UTC | #1
On Thu, Oct 10, 2013 at 10:01 AM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:

> It makes more sense to have these functions close to each other. No
> functional changes.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

So I've applied this first patch, and I'm just waiting for Alexandre's
ACK on the remaining patches concerning gpiod so we get this
100% right.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexandre Courbot Oct. 11, 2013, 4:42 p.m. UTC | #2
On Fri, Oct 11, 2013 at 4:00 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, Oct 10, 2013 at 10:01 AM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
>
>> It makes more sense to have these functions close to each other. No
>> functional changes.
>>
>> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> So I've applied this first patch, and I'm just waiting for Alexandre's
> ACK on the remaining patches concerning gpiod so we get this
> 100% right.

I think I'm ok with Mika's patches, however I need to send you a new
version of gpiod. I wanted to finish documentation first, but maybe
that can come slightly after so you can at least go ahead with both
series?
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Oct. 14, 2013, 6:58 a.m. UTC | #3
On Fri, Oct 11, 2013 at 6:42 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
> On Fri, Oct 11, 2013 at 4:00 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Thu, Oct 10, 2013 at 10:01 AM, Mika Westerberg
>> <mika.westerberg@linux.intel.com> wrote:
>>
>>> It makes more sense to have these functions close to each other. No
>>> functional changes.
>>>
>>> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>>> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> So I've applied this first patch, and I'm just waiting for Alexandre's
>> ACK on the remaining patches concerning gpiod so we get this
>> 100% right.
>
> I think I'm ok with Mika's patches, however I need to send you a new
> version of gpiod. I wanted to finish documentation first, but maybe
> that can come slightly after so you can at least go ahead with both
> series?

The important thing right now is to get it in a testable form I think?
So that I can throw it at the autobuilder and it gets included into
linux-next as that comes back online.

So give me whatever you have ... BTW is this series dependent on
yours to go in first? Sorry for not seeing the details here...

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mika Westerberg Oct. 14, 2013, 10:43 a.m. UTC | #4
On Mon, Oct 14, 2013 at 08:58:05AM +0200, Linus Walleij wrote:
> On Fri, Oct 11, 2013 at 6:42 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
> > On Fri, Oct 11, 2013 at 4:00 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> >> On Thu, Oct 10, 2013 at 10:01 AM, Mika Westerberg
> >> <mika.westerberg@linux.intel.com> wrote:
> >>
> >>> It makes more sense to have these functions close to each other. No
> >>> functional changes.
> >>>
> >>> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> >>> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >>
> >> So I've applied this first patch, and I'm just waiting for Alexandre's
> >> ACK on the remaining patches concerning gpiod so we get this
> >> 100% right.
> >
> > I think I'm ok with Mika's patches, however I need to send you a new
> > version of gpiod. I wanted to finish documentation first, but maybe
> > that can come slightly after so you can at least go ahead with both
> > series?
> 
> The important thing right now is to get it in a testable form I think?
> So that I can throw it at the autobuilder and it gets included into
> linux-next as that comes back online.
> 
> So give me whatever you have ... BTW is this series dependent on
> yours to go in first? Sorry for not seeing the details here...

Correct, this series depends on Alexandre's patches.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexandre Courbot Oct. 14, 2013, 4:55 p.m. UTC | #5
On Sun, Oct 13, 2013 at 11:58 PM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Fri, Oct 11, 2013 at 6:42 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
>> On Fri, Oct 11, 2013 at 4:00 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>>> On Thu, Oct 10, 2013 at 10:01 AM, Mika Westerberg
>>> <mika.westerberg@linux.intel.com> wrote:
>>>
>>>> It makes more sense to have these functions close to each other. No
>>>> functional changes.
>>>>
>>>> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>>>> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>
>>> So I've applied this first patch, and I'm just waiting for Alexandre's
>>> ACK on the remaining patches concerning gpiod so we get this
>>> 100% right.
>>
>> I think I'm ok with Mika's patches, however I need to send you a new
>> version of gpiod. I wanted to finish documentation first, but maybe
>> that can come slightly after so you can at least go ahead with both
>> series?
>
> The important thing right now is to get it in a testable form I think?
> So that I can throw it at the autobuilder and it gets included into
> linux-next as that comes back online.
>
> So give me whatever you have ... BTW is this series dependent on
> yours to go in first? Sorry for not seeing the details here...

Yes it is. I have sent you the v2 of my series last Friday (+ one fix
to squash into 3/3).
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" 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 f2beb72..1745ce5 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -194,6 +194,44 @@  void acpi_gpiochip_request_interrupts(struct gpio_chip *chip)
 }
 EXPORT_SYMBOL(acpi_gpiochip_request_interrupts);
 
+/**
+ * acpi_gpiochip_free_interrupts() - Free GPIO _EVT ACPI event interrupts.
+ * @chip:      gpio chip
+ *
+ * Free interrupts associated with the _EVT method for the given GPIO chip.
+ *
+ * The remaining ACPI event interrupts associated with the chip are freed
+ * automatically.
+ */
+void acpi_gpiochip_free_interrupts(struct gpio_chip *chip)
+{
+	acpi_handle handle;
+	acpi_status status;
+	struct list_head *evt_pins;
+	struct acpi_gpio_evt_pin *evt_pin, *ep;
+
+	if (!chip->dev || !chip->to_irq)
+		return;
+
+	handle = ACPI_HANDLE(chip->dev);
+	if (!handle)
+		return;
+
+	status = acpi_get_data(handle, acpi_gpio_evt_dh, (void **)&evt_pins);
+	if (ACPI_FAILURE(status))
+		return;
+
+	list_for_each_entry_safe_reverse(evt_pin, ep, evt_pins, node) {
+		devm_free_irq(chip->dev, evt_pin->irq, evt_pin);
+		list_del(&evt_pin->node);
+		kfree(evt_pin);
+	}
+
+	acpi_detach_data(handle, acpi_gpio_evt_dh);
+	kfree(evt_pins);
+}
+EXPORT_SYMBOL(acpi_gpiochip_free_interrupts);
+
 struct acpi_gpio_lookup {
 	struct acpi_gpio_info info;
 	int index;
@@ -271,41 +309,3 @@  int acpi_get_gpio_by_index(struct device *dev, int index,
 	return lookup.gpio;
 }
 EXPORT_SYMBOL_GPL(acpi_get_gpio_by_index);
-
-/**
- * acpi_gpiochip_free_interrupts() - Free GPIO _EVT ACPI event interrupts.
- * @chip:      gpio chip
- *
- * Free interrupts associated with the _EVT method for the given GPIO chip.
- *
- * The remaining ACPI event interrupts associated with the chip are freed
- * automatically.
- */
-void acpi_gpiochip_free_interrupts(struct gpio_chip *chip)
-{
-	acpi_handle handle;
-	acpi_status status;
-	struct list_head *evt_pins;
-	struct acpi_gpio_evt_pin *evt_pin, *ep;
-
-	if (!chip->dev || !chip->to_irq)
-		return;
-
-	handle = ACPI_HANDLE(chip->dev);
-	if (!handle)
-		return;
-
-	status = acpi_get_data(handle, acpi_gpio_evt_dh, (void **)&evt_pins);
-	if (ACPI_FAILURE(status))
-		return;
-
-	list_for_each_entry_safe_reverse(evt_pin, ep, evt_pins, node) {
-		devm_free_irq(chip->dev, evt_pin->irq, evt_pin);
-		list_del(&evt_pin->node);
-		kfree(evt_pin);
-	}
-
-	acpi_detach_data(handle, acpi_gpio_evt_dh);
-	kfree(evt_pins);
-}
-EXPORT_SYMBOL(acpi_gpiochip_free_interrupts);