diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-31 05:20:49 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-20 19:03:43 -0400 |
commit | a6f97b293b08877d945ea3f28926aa446dd7ca2e (patch) | |
tree | 8e2c2e585ef056d36023dfb384b2806bebf312d3 /drivers/char/specialix.c | |
parent | e8f39549580e04e0b8edd11bae834ae7f8322fc8 (diff) |
drivers/char: minor irq handler cleanups
- remove always-false tests
- don't overload 'irq' argument, pass data properly via dev_id
- remove pointless casts from void*
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/char/specialix.c')
-rw-r--r-- | drivers/char/specialix.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 5ff83df67b44..4b5b5b78acb4 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -443,8 +443,7 @@ void missed_irq (unsigned long data) | |||
443 | spin_unlock_irqrestore(&bp->lock, flags); | 443 | spin_unlock_irqrestore(&bp->lock, flags); |
444 | if (irq) { | 444 | if (irq) { |
445 | printk (KERN_INFO "Missed interrupt... Calling int from timer. \n"); | 445 | printk (KERN_INFO "Missed interrupt... Calling int from timer. \n"); |
446 | sx_interrupt (((struct specialix_board *)data)->irq, | 446 | sx_interrupt (-1, bp); |
447 | (void*)data); | ||
448 | } | 447 | } |
449 | mod_timer(&missed_irq_timer, jiffies + sx_poll); | 448 | mod_timer(&missed_irq_timer, jiffies + sx_poll); |
450 | } | 449 | } |
@@ -862,23 +861,22 @@ static inline void sx_check_modem(struct specialix_board * bp) | |||
862 | 861 | ||
863 | 862 | ||
864 | /* The main interrupt processing routine */ | 863 | /* The main interrupt processing routine */ |
865 | static irqreturn_t sx_interrupt(int irq, void *dev_id) | 864 | static irqreturn_t sx_interrupt(int dummy, void *dev_id) |
866 | { | 865 | { |
867 | unsigned char status; | 866 | unsigned char status; |
868 | unsigned char ack; | 867 | unsigned char ack; |
869 | struct specialix_board *bp; | 868 | struct specialix_board *bp = dev_id; |
870 | unsigned long loop = 0; | 869 | unsigned long loop = 0; |
871 | int saved_reg; | 870 | int saved_reg; |
872 | unsigned long flags; | 871 | unsigned long flags; |
873 | 872 | ||
874 | func_enter(); | 873 | func_enter(); |
875 | 874 | ||
876 | bp = dev_id; | ||
877 | spin_lock_irqsave(&bp->lock, flags); | 875 | spin_lock_irqsave(&bp->lock, flags); |
878 | 876 | ||
879 | dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); | 877 | dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); |
880 | if (!(bp->flags & SX_BOARD_ACTIVE)) { | 878 | if (!(bp->flags & SX_BOARD_ACTIVE)) { |
881 | dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq); | 879 | dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", bp->irq); |
882 | spin_unlock_irqrestore(&bp->lock, flags); | 880 | spin_unlock_irqrestore(&bp->lock, flags); |
883 | func_exit(); | 881 | func_exit(); |
884 | return IRQ_NONE; | 882 | return IRQ_NONE; |