linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.36] mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types
@ 2010-08-16 19:26 Mark Brown
  2010-08-20 21:49 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2010-08-16 19:26 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel, Mark Brown, stable

The driver was originally tested with an additional patch which
made this unneeded but that patch had issuges and got lost on the
way to mainline, causing problems when the errors are reported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
---
 drivers/mfd/wm831x-irq.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 7dabe4d..294183b 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -394,8 +394,13 @@ static int wm831x_irq_set_type(unsigned int irq, unsigned int type)
 
 	irq = irq - wm831x->irq_base;
 
-	if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11)
-		return -EINVAL;
+	if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) {
+		/* Ignore internal-only IRQs */
+		if (irq >= 0 && irq < WM831X_NUM_IRQS)
+			return 0;
+		else
+			return -EINVAL;
+	}
 
 	switch (type) {
 	case IRQ_TYPE_EDGE_BOTH:
-- 
1.7.1


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

* Re: [PATCH 2.6.36] mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types
  2010-08-16 19:26 [PATCH 2.6.36] mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types Mark Brown
@ 2010-08-20 21:49 ` Samuel Ortiz
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2010-08-20 21:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, stable

Hi Mark,

On Mon, Aug 16, 2010 at 08:26:51PM +0100, Mark Brown wrote:
> The driver was originally tested with an additional patch which
> made this unneeded but that patch had issuges and got lost on the
> way to mainline, causing problems when the errors are reported.
Thanks, applied to my for-linus branch.
I'll send it with my next 2.6.36 mfd fixes pull request.

Cheers,
Samuel.


> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: stable@kernel.org
> ---
>  drivers/mfd/wm831x-irq.c |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
> index 7dabe4d..294183b 100644
> --- a/drivers/mfd/wm831x-irq.c
> +++ b/drivers/mfd/wm831x-irq.c
> @@ -394,8 +394,13 @@ static int wm831x_irq_set_type(unsigned int irq, unsigned int type)
>  
>  	irq = irq - wm831x->irq_base;
>  
> -	if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11)
> -		return -EINVAL;
> +	if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) {
> +		/* Ignore internal-only IRQs */
> +		if (irq >= 0 && irq < WM831X_NUM_IRQS)
> +			return 0;
> +		else
> +			return -EINVAL;
> +	}
>  
>  	switch (type) {
>  	case IRQ_TYPE_EDGE_BOTH:
> -- 
> 1.7.1
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

end of thread, other threads:[~2010-08-20 21:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 19:26 [PATCH 2.6.36] mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types Mark Brown
2010-08-20 21:49 ` Samuel Ortiz

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).