static void snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct snd_gusmax *maxcard = (struct snd_gusmax *) dev_id; int loop, max = 5; do { loop = 0; if (inb(maxcard->gus_status_reg)) { snd_gus_interrupt(irq, maxcard->gus, regs); loop++; } if (inb(maxcard->pcm_status_reg) & 0x01) { /* IRQ bit is set? */ snd_cs4231_interrupt(irq, maxcard->cs4231, regs); loop++; } } while (loop && --max > 0); }
static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct snd_gusmax *maxcard = (struct snd_gusmax *) dev_id; int loop, max = 5; int handled = 0; do { loop = 0; if (inb(maxcard->gus_status_reg)) { handled = 1; snd_gus_interrupt(irq, maxcard->gus, regs); loop++; } if (inb(maxcard->pcm_status_reg) & 0x01) { /* IRQ bit is set? */ handled = 1; snd_cs4231_interrupt(irq, maxcard->cs4231, regs); loop++; } } while (loop && --max > 0); return IRQ_RETVAL(handled); }