Skip to content

Commit

Permalink
Char: cyclades, allow DEBUG_SHIRQ
Browse files Browse the repository at this point in the history
Test if base addr is non-null in ISR to prove the card has been correctly
initialized.  This is needed for DEBUG_SHIRQ for example.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed May 8, 2007
1 parent 85c93fa commit f1e83c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/char/cyclades.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,10 @@ static irqreturn_t cyy_interrupt(int irq, void *dev_id)
card_base_addr = cinfo->base_addr;
index = cinfo->bus_index;

/* card was not initialized yet (e.g. DEBUG_SHIRQ) */
if (unlikely(card_base_addr == NULL))
return IRQ_HANDLED;

/* This loop checks all chips in the card. Make a note whenever
_any_ chip had some work to do, as this is considered an
indication that there will be more to do. Only when no chip
Expand Down

0 comments on commit f1e83c6

Please sign in to comment.