Skip to contentSkip to conversation

teach trident_interrupt() about irqreturn_t

TRIDENT Muli Ben-Yehuda 2 participants 2 messages Apr 21, 2003

lore
Share & tools
lore
#0 lore raw

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

oss/trident.c +7 -4
diff -u -r1.20 trident.c
@@ -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
Signature · 2 lines
Muli Ben-Yehuda
http://www.mulix.org
#1 lore raw
Quoted 5 lines · Muli Ben-Yehuda

Hi Linus,

This patch updates trident_interrupt() to return
IRQ_HANDLED

I've just done the whole kernel apart from a few scsi drivers (I think).

Sit tight for a day...