LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Johannes Berg" <johannes@sipsolutions.net>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>
Cc: Per Christian Henden <perchrh@pvv.org>,
	paulus@samba.org, linuxppc-dev@ozlabs.org
Subject: [PATCH] aoa: fix feature-call GPIO layer
Date: Sun, 16 Jul 2006 22:19:17 +0200 (CEST)	[thread overview]
Message-ID: <55230.84.135.251.38.1153081157.squirrel@secure.sipsolutions.net> (raw)
In-Reply-To: <1153065707.5905.8.camel@localhost.localdomain>

I hope this isn't too badly mangled... I'm without a proper mail client
right now because my ~ is corrupted enough to be put offline once I access
it a lot :/ I intend to repair this tomorrow, so if it is mangled I can
resend Tuesday.
---
This fixes the feature-call GPIO layer in snd-aoa which is used on
machines without platform functions so that it doesn't try to look up an
interrupt property for detect device nodes that don't exist.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

Index: linux-2.6-fetch/sound/aoa/core/snd-aoa-gpio-feature.c
===================================================================
--- 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-16 20:19 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1153065707.5905.8.camel@localhost.localdomain>]

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=55230.84.135.251.38.1153081157.squirrel@secure.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=perchrh@pvv.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