From a6f97b293b08877d945ea3f28926aa446dd7ca2e Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Wed, 31 Oct 2007 05:20:49 -0400 Subject: 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 --- drivers/char/specialix.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'drivers/char/specialix.c') 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) spin_unlock_irqrestore(&bp->lock, flags); if (irq) { printk (KERN_INFO "Missed interrupt... Calling int from timer. \n"); - sx_interrupt (((struct specialix_board *)data)->irq, - (void*)data); + sx_interrupt (-1, bp); } mod_timer(&missed_irq_timer, jiffies + sx_poll); } @@ -862,23 +861,22 @@ static inline void sx_check_modem(struct specialix_board * bp) /* The main interrupt processing routine */ -static irqreturn_t sx_interrupt(int irq, void *dev_id) +static irqreturn_t sx_interrupt(int dummy, void *dev_id) { unsigned char status; unsigned char ack; - struct specialix_board *bp; + struct specialix_board *bp = dev_id; unsigned long loop = 0; int saved_reg; unsigned long flags; func_enter(); - bp = dev_id; spin_lock_irqsave(&bp->lock, flags); 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); if (!(bp->flags & SX_BOARD_ACTIVE)) { - dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq); + dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", bp->irq); spin_unlock_irqrestore(&bp->lock, flags); func_exit(); return IRQ_NONE; -- cgit v1.2.2