linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field
@ 2017-07-20 16:59 Thierry Reding
  2017-07-26 19:49 ` Eric Anholt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thierry Reding @ 2017-07-20 16:59 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bcm-kernel-feedback-list, linux-gpio, linux-rpi-kernel

From: Thierry Reding <treding@nvidia.com>

The irq_group field stores a 1:1 mapping. Use the loop variable to
derive the values instead of storing them in an extra array.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index a605d74552b6..834d4862dd15 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -92,7 +92,6 @@ struct bcm2835_pinctrl {
 	struct gpio_chip gpio_chip;
 	struct pinctrl_gpio_range gpio_range;
 
-	int irq_group[BCM2835_NUM_IRQS];
 	spinlock_t irq_lock[BCM2835_NUM_BANKS];
 };
 
@@ -400,7 +399,7 @@ static void bcm2835_gpio_irq_handler(struct irq_desc *desc)
 
 	for (i = 0; i < ARRAY_SIZE(pc->irq); i++) {
 		if (pc->irq[i] == irq) {
-			group = pc->irq_group[i];
+			group = i;
 			break;
 		}
 	}
@@ -1047,7 +1046,6 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
 
 	for (i = 0; i < BCM2835_NUM_IRQS; i++) {
 		pc->irq[i] = irq_of_parse_and_map(np, i);
-		pc->irq_group[i] = i;
 
 		if (pc->irq[i] == 0)
 			continue;
-- 
2.13.3


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

* Re: [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field
  2017-07-20 16:59 [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field Thierry Reding
@ 2017-07-26 19:49 ` Eric Anholt
  2017-07-31 10:57 ` Thierry Reding
  2017-08-02 12:21 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2017-07-26 19:49 UTC (permalink / raw)
  To: Thierry Reding, Linus Walleij
  Cc: linux-gpio, bcm-kernel-feedback-list, linux-rpi-kernel

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

Thierry Reding <thierry.reding@gmail.com> writes:

> From: Thierry Reding <treding@nvidia.com>
>
> The irq_group field stores a 1:1 mapping. Use the loop variable to
> derive the values instead of storing them in an extra array.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Reviewed-by: Eric Anholt <eric@anholt.net>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field
  2017-07-20 16:59 [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field Thierry Reding
  2017-07-26 19:49 ` Eric Anholt
@ 2017-07-31 10:57 ` Thierry Reding
  2017-08-02 12:21 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2017-07-31 10:57 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bcm-kernel-feedback-list, linux-gpio, linux-rpi-kernel

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

On Thu, Jul 20, 2017 at 06:59:12PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The irq_group field stores a 1:1 mapping. Use the loop variable to
> derive the values instead of storing them in an extra array.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Ping...

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field
  2017-07-20 16:59 [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field Thierry Reding
  2017-07-26 19:49 ` Eric Anholt
  2017-07-31 10:57 ` Thierry Reding
@ 2017-08-02 12:21 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2017-08-02 12:21 UTC (permalink / raw)
  To: Thierry Reding
  Cc: bcm-kernel-feedback-list, linux-gpio@vger.kernel.org,
	linux-rpi-kernel

On Thu, Jul 20, 2017 at 6:59 PM, Thierry Reding
<thierry.reding@gmail.com> wrote:

> From: Thierry Reding <treding@nvidia.com>
>
> The irq_group field stores a 1:1 mapping. Use the loop variable to
> derive the values instead of storing them in an extra array.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Patch applied with Eric's review tag.

Yours,
Linus Walleij

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

end of thread, other threads:[~2017-08-02 12:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-20 16:59 [PATCH] pinctrl: bcm2835: Remove unneeded irq_group field Thierry Reding
2017-07-26 19:49 ` Eric Anholt
2017-07-31 10:57 ` Thierry Reding
2017-08-02 12:21 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).