linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linuxppc-dev@ozlabs.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/5] aoa: feature gpio layer: fix IRQ access
Date: Tue, 18 Jul 2006 14:45:28 -0400	[thread overview]
Message-ID: <1153248328.5905.67.camel@localhost.localdomain> (raw)
In-Reply-To: <20060718173012.532719000@sipsolutions.net>>

On Tue, 2006-07-18 at 19:28 +0200, Johannes Berg wrote:
> plain text document attachment (aoa-get-irq-fix.patch)
> The IRQ rework caused some hiccups here, in some cases we call
> get_irq without a device node. This patch makes it catch that
> case and return NO_IRQ when it happens, along with changing the
> place where the irq is checked to check for NO_IRQ instead of -1.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> 
> --- linux-2.6-fetch.orig/sound/aoa/core/snd-aoa-gpio-feature.c	2006-07-16 22:10:02.467630929 +0200
> +++ linux-2.6-fetch/sound/aoa/core/snd-aoa-gpio-feature.c	2006-07-16 22:13:41.891630929 +0200
> @@ -112,7 +112,10 @@ static struct device_node *get_gpio(char
>  
>  static void get_irq(struct device_node * np, int *irqptr)
>  {
> -	*irqptr = irq_of_parse_and_map(np, 0);
> +	if (np)
> +		*irqptr = irq_of_parse_and_map(np, 0);
> +	else
> +		*irqptr = NO_IRQ;
>  }
>  
>  /* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
> @@ -322,7 +325,7 @@ static int ftr_set_notify(struct gpio_ru
>  		return -EINVAL;
>  	}
>  
> -	if (irq == -1)
> +	if (irq == NO_IRQ)
>  		return -ENODEV;
>  
>  	mutex_lock(&notif->mutex);
> 
> --

  reply	other threads:[~2006-07-18 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18 17:28 [PATCH 0/5] powerpc sound, some more patches Johannes Berg
2006-07-18 17:28 ` [PATCH 1/5] aoa: feature gpio layer: fix IRQ access Johannes Berg
2006-07-18 18:45   ` Benjamin Herrenschmidt [this message]
2006-07-18 17:28 ` [PATCH 2/5] aoa: fix toonie codec Johannes Berg
2006-07-18 17:28 ` [PATCH 3/5] make snd-powermac load even when it cant bind the device Johannes Berg
2006-07-18 17:28 ` [PATCH 4/5] aoa: platform function gpio: ignore errors from functions that dont exist Johannes Berg
2006-07-18 17:28 ` [PATCH 5/5] add MAINTAINERS entry for snd-aoa Johannes Berg
2006-07-25 14:17 ` [Alsa-devel] [PATCH 0/5] powerpc sound, some more patches Takashi Iwai
2006-07-25 15:13   ` Johannes Berg
2006-07-25 15:21     ` Takashi Iwai
2006-08-05 16:09       ` Johannes Berg
2006-07-25 21:52     ` Benjamin Herrenschmidt
2006-07-26 17:19       ` Johannes Berg

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=1153248328.5905.67.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=johannes@sipsolutions.net \
    --cc=linuxppc-dev@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).