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/synclink.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'drivers/char/synclink.c') diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index ddc74d1f4f1b..a3237d48a584 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c @@ -1695,20 +1695,16 @@ static void mgsl_isr_transmit_dma( struct mgsl_struct *info ) * * Return Value: None */ -static irqreturn_t mgsl_interrupt(int irq, void *dev_id) +static irqreturn_t mgsl_interrupt(int dummy, void *dev_id) { - struct mgsl_struct * info; + struct mgsl_struct *info = dev_id; u16 UscVector; u16 DmaVector; if ( debug_level >= DEBUG_LEVEL_ISR ) - printk("%s(%d):mgsl_interrupt(%d)entry.\n", - __FILE__,__LINE__,irq); + printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)entry.\n", + __FILE__, __LINE__, info->irq_level); - info = (struct mgsl_struct *)dev_id; - if (!info) - return IRQ_NONE; - spin_lock(&info->irq_spinlock); for(;;) { @@ -1732,8 +1728,8 @@ static irqreturn_t mgsl_interrupt(int irq, void *dev_id) mgsl_isr_receive_dma(info); if ( info->isr_overflow ) { - printk(KERN_ERR"%s(%d):%s isr overflow irq=%d\n", - __FILE__,__LINE__,info->device_name, irq); + printk(KERN_ERR "%s(%d):%s isr overflow irq=%d\n", + __FILE__, __LINE__, info->device_name, info->irq_level); usc_DisableMasterIrqBit(info); usc_DisableDmaInterrupts(info,DICR_MASTER); break; @@ -1755,8 +1751,9 @@ static irqreturn_t mgsl_interrupt(int irq, void *dev_id) spin_unlock(&info->irq_spinlock); if ( debug_level >= DEBUG_LEVEL_ISR ) - printk("%s(%d):mgsl_interrupt(%d)exit.\n", - __FILE__,__LINE__,irq); + printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)exit.\n", + __FILE__, __LINE__, info->irq_level); + return IRQ_HANDLED; } /* end of mgsl_interrupt() */ -- cgit v1.2.2