All of lore.kernel.org
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <mulix@mulix.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: [TRIDENT] teach trident_interrupt() about irqreturn_t
Date: Mon, 21 Apr 2003 13:07:12 +0300	[thread overview]
Message-ID: <20030421100712.GA2188@actcom.co.il> (raw)

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

Hi Linus, 

This patch updates trident_interrupt() to return
IRQ_HANDLED and cleans it up a little while I'm at it. Compiles, boots
and plays mp3s fine. Patch is against 2.5.68-cvs, please apply.

Index: sound/oss/trident.c
===================================================================
RCS file: /home/cvs/linux-2.5/sound/oss/trident.c,v
retrieving revision 1.20
diff -u -r1.20 trident.c
--- sound/oss/trident.c	8 Apr 2003 16:46:36 -0000	1.20
+++ sound/oss/trident.c	21 Apr 2003 09:02:01 -0000
@@ -1728,7 +1728,7 @@
 	}
 }
 
-static void trident_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t trident_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct trident_card *card = (struct trident_card *)dev_id;
 	u32 event;
@@ -1753,15 +1753,18 @@
 				ali_queue_task(card, gpio&0x07);
 		}
 		event = inl(TRID_REG(card, T4D_MISCINT));
-		outl(event | (ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW), TRID_REG(card, T4D_MISCINT));
-		spin_unlock(&card->lock);
-		return;
+		event |= (ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW); 
+		outl(event, TRID_REG(card, T4D_MISCINT));
+		goto done; 
 	}
 
 	/* manually clear interrupt status, bad hardware design, blame T^2 */
 	outl((ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW),
 	     TRID_REG(card, T4D_MISCINT));
+
+done: 
 	spin_unlock(&card->lock);
+	return IRQ_HANDLED;
 }
 
 /* in this loop, dmabuf.count signifies the amount of data that is waiting to be copied to

-- 
Muli Ben-Yehuda
http://www.mulix.org


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2003-04-21  9:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-21 10:07 Muli Ben-Yehuda [this message]
2003-04-21 10:58 ` [TRIDENT] teach trident_interrupt() about irqreturn_t Andrew Morton

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=20030421100712.GA2188@actcom.co.il \
    --to=mulix@mulix.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.