diff options
Diffstat (limited to 'sound/isa/gus/gus_irq.c')
-rw-r--r-- | sound/isa/gus/gus_irq.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c index a0430b338d67..cd9a6f1c99e6 100644 --- a/sound/isa/gus/gus_irq.c +++ b/sound/isa/gus/gus_irq.c | |||
@@ -45,11 +45,13 @@ __again: | |||
45 | // snd_printk("IRQ: status = 0x%x\n", status); | 45 | // snd_printk("IRQ: status = 0x%x\n", status); |
46 | if (status & 0x02) { | 46 | if (status & 0x02) { |
47 | STAT_ADD(gus->gf1.interrupt_stat_midi_in); | 47 | STAT_ADD(gus->gf1.interrupt_stat_midi_in); |
48 | gus->gf1.interrupt_handler_midi_in(gus); | 48 | if (gus->gf1.interrupt_handler_midi_in) |
49 | gus->gf1.interrupt_handler_midi_in(gus); | ||
49 | } | 50 | } |
50 | if (status & 0x01) { | 51 | if (status & 0x01) { |
51 | STAT_ADD(gus->gf1.interrupt_stat_midi_out); | 52 | STAT_ADD(gus->gf1.interrupt_stat_midi_out); |
52 | gus->gf1.interrupt_handler_midi_out(gus); | 53 | if (gus->gf1.interrupt_handler_midi_out) |
54 | gus->gf1.interrupt_handler_midi_out(gus); | ||
53 | } | 55 | } |
54 | if (status & (0x20 | 0x40)) { | 56 | if (status & (0x20 | 0x40)) { |
55 | unsigned int already, _current_; | 57 | unsigned int already, _current_; |
@@ -85,20 +87,24 @@ __again: | |||
85 | } | 87 | } |
86 | if (status & 0x04) { | 88 | if (status & 0x04) { |
87 | STAT_ADD(gus->gf1.interrupt_stat_timer1); | 89 | STAT_ADD(gus->gf1.interrupt_stat_timer1); |
88 | gus->gf1.interrupt_handler_timer1(gus); | 90 | if (gus->gf1.interrupt_handler_timer1) |
91 | gus->gf1.interrupt_handler_timer1(gus); | ||
89 | } | 92 | } |
90 | if (status & 0x08) { | 93 | if (status & 0x08) { |
91 | STAT_ADD(gus->gf1.interrupt_stat_timer2); | 94 | STAT_ADD(gus->gf1.interrupt_stat_timer2); |
92 | gus->gf1.interrupt_handler_timer2(gus); | 95 | if (gus->gf1.interrupt_handler_timer2) |
96 | gus->gf1.interrupt_handler_timer2(gus); | ||
93 | } | 97 | } |
94 | if (status & 0x80) { | 98 | if (status & 0x80) { |
95 | if (snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL) & 0x40) { | 99 | if (snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL) & 0x40) { |
96 | STAT_ADD(gus->gf1.interrupt_stat_dma_write); | 100 | STAT_ADD(gus->gf1.interrupt_stat_dma_write); |
97 | gus->gf1.interrupt_handler_dma_write(gus); | 101 | if (gus->gf1.interrupt_handler_dma_write) |
102 | gus->gf1.interrupt_handler_dma_write(gus); | ||
98 | } | 103 | } |
99 | if (snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL) & 0x40) { | 104 | if (snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL) & 0x40) { |
100 | STAT_ADD(gus->gf1.interrupt_stat_dma_read); | 105 | STAT_ADD(gus->gf1.interrupt_stat_dma_read); |
101 | gus->gf1.interrupt_handler_dma_read(gus); | 106 | if (gus->gf1.interrupt_handler_dma_read) |
107 | gus->gf1.interrupt_handler_dma_read(gus); | ||
102 | } | 108 | } |
103 | } | 109 | } |
104 | if (--loop > 0) | 110 | if (--loop > 0) |