public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
@ 2012-09-30  8:23 Axel Lin
  2012-09-30  8:45 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Axel Lin @ 2012-09-30  8:23 UTC (permalink / raw)
  To: Linus Walleij, Jason Cooper
  Cc: Thomas Petazzoni, Grant Likely, Sebastian Hesselbarth,
	Andrew Lunn, Arnd Bergmann, linux-kernel

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/gpio/gpio-mvebu.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 902af43..7a874129 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -381,11 +381,13 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 		u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
 		u &= ~(1 << pin);
 		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
+		break;
 	case IRQ_TYPE_EDGE_FALLING:
 	case IRQ_TYPE_LEVEL_LOW:
 		u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
 		u |= 1 << pin;
 		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
+		break;
 	case IRQ_TYPE_EDGE_BOTH: {
 		u32 v;
 
@@ -401,6 +403,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 		else
 			u &= ~(1 << pin);	/* rising */
 		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
+		break;
 	}
 	}
 	return 0;
-- 
1.7.9.5




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

* Re: [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
  2012-09-30  8:23 [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type Axel Lin
@ 2012-09-30  8:45 ` Andrew Lunn
  2012-09-30 10:35 ` Thomas Petazzoni
  2012-09-30 21:49 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2012-09-30  8:45 UTC (permalink / raw)
  To: Axel Lin
  Cc: Linus Walleij, Jason Cooper, Thomas Petazzoni, Grant Likely,
	Sebastian Hesselbarth, Andrew Lunn, Arnd Bergmann, linux-kernel

On Sun, Sep 30, 2012 at 04:23:27PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/gpio/gpio-mvebu.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index 902af43..7a874129 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -381,11 +381,13 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
>  		u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
>  		u &= ~(1 << pin);
>  		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> +		break;
>  	case IRQ_TYPE_EDGE_FALLING:
>  	case IRQ_TYPE_LEVEL_LOW:
>  		u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
>  		u |= 1 << pin;
>  		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> +		break;
>  	case IRQ_TYPE_EDGE_BOTH: {
>  		u32 v;
>  
> @@ -401,6 +403,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
>  		else
>  			u &= ~(1 << pin);	/* rising */
>  		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> +		break;
>  	}
>  	}
>  	return 0;

Hi Axel

Good catch, thanks.

Acked-by: Andrew Lunn <andrew@lunn.ch>

	  Andrew

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

* Re: [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
  2012-09-30  8:23 [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type Axel Lin
  2012-09-30  8:45 ` Andrew Lunn
@ 2012-09-30 10:35 ` Thomas Petazzoni
  2012-09-30 21:49 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2012-09-30 10:35 UTC (permalink / raw)
  To: Axel Lin
  Cc: Linus Walleij, Jason Cooper, Grant Likely, Sebastian Hesselbarth,
	Andrew Lunn, Arnd Bergmann, linux-kernel

Dear Axel Lin,

On Sun, 30 Sep 2012 16:23:27 +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/gpio/gpio-mvebu.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index 902af43..7a874129 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -381,11 +381,13 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
>  		u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
>  		u &= ~(1 << pin);
>  		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> +		break;
>  	case IRQ_TYPE_EDGE_FALLING:
>  	case IRQ_TYPE_LEVEL_LOW:
>  		u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
>  		u |= 1 << pin;
>  		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> +		break;
>  	case IRQ_TYPE_EDGE_BOTH: {
>  		u32 v;
>  
> @@ -401,6 +403,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
>  		else
>  			u &= ~(1 << pin);	/* rising */
>  		writel_relaxed(u, mvebu_gpioreg_in_pol(mvchip));
> +		break;
>  	}
>  	}
>  	return 0;

Doh, I missed this when converting the if() series to a switch()
construct. It was just pure luck that it worked. Good catch indeed.

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
  2012-09-30  8:23 [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type Axel Lin
  2012-09-30  8:45 ` Andrew Lunn
  2012-09-30 10:35 ` Thomas Petazzoni
@ 2012-09-30 21:49 ` Linus Walleij
  2012-10-01  0:11   ` Jason Cooper
  2 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2012-09-30 21:49 UTC (permalink / raw)
  To: Axel Lin
  Cc: Linus Walleij, Jason Cooper, Thomas Petazzoni, Grant Likely,
	Sebastian Hesselbarth, Andrew Lunn, Arnd Bergmann, linux-kernel

On Sun, Sep 30, 2012 at 10:23 AM, Axel Lin <axel.lin@ingics.com> wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Since this gpio-mvebu patch is in ARM SoC or somewhere I expect
whoever put it there to safeguide the fix to its destination.

Else poke me after 3.7-rc1 and I'll take it as a GPIO fix...

Yours,
Linus Walleij

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

* Re: [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
  2012-09-30 21:49 ` Linus Walleij
@ 2012-10-01  0:11   ` Jason Cooper
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Cooper @ 2012-10-01  0:11 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Axel Lin, Linus Walleij, Thomas Petazzoni, Grant Likely,
	Sebastian Hesselbarth, Andrew Lunn, Arnd Bergmann, linux-kernel

On Sun, Sep 30, 2012 at 11:49:49PM +0200, Linus Walleij wrote:
> On Sun, Sep 30, 2012 at 10:23 AM, Axel Lin <axel.lin@ingics.com> wrote:
> 
> > Signed-off-by: Axel Lin <axel.lin@ingics.com>
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Since this gpio-mvebu patch is in ARM SoC or somewhere I expect
> whoever put it there to safeguide the fix to its destination.

yep, I got it.

thx,

Jason.

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

end of thread, other threads:[~2012-10-01  0:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30  8:23 [PATCH] gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type Axel Lin
2012-09-30  8:45 ` Andrew Lunn
2012-09-30 10:35 ` Thomas Petazzoni
2012-09-30 21:49 ` Linus Walleij
2012-10-01  0:11   ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox