aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-31 05:20:49 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-20 19:03:43 -0400
commita6f97b293b08877d945ea3f28926aa446dd7ca2e (patch)
tree8e2c2e585ef056d36023dfb384b2806bebf312d3 /drivers/char/synclink.c
parente8f39549580e04e0b8edd11bae834ae7f8322fc8 (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/synclink.c')
-rw-r--r--drivers/char/synclink.c21
1 files changed, 9 insertions, 12 deletions
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 )
1695 * 1695 *
1696 * Return Value: None 1696 * Return Value: None
1697 */ 1697 */
1698static irqreturn_t mgsl_interrupt(int irq, void *dev_id) 1698static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
1699{ 1699{
1700 struct mgsl_struct * info; 1700 struct mgsl_struct *info = dev_id;
1701 u16 UscVector; 1701 u16 UscVector;
1702 u16 DmaVector; 1702 u16 DmaVector;
1703 1703
1704 if ( debug_level >= DEBUG_LEVEL_ISR ) 1704 if ( debug_level >= DEBUG_LEVEL_ISR )
1705 printk("%s(%d):mgsl_interrupt(%d)entry.\n", 1705 printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)entry.\n",
1706 __FILE__,__LINE__,irq); 1706 __FILE__, __LINE__, info->irq_level);
1707 1707
1708 info = (struct mgsl_struct *)dev_id;
1709 if (!info)
1710 return IRQ_NONE;
1711
1712 spin_lock(&info->irq_spinlock); 1708 spin_lock(&info->irq_spinlock);
1713 1709
1714 for(;;) { 1710 for(;;) {
@@ -1732,8 +1728,8 @@ static irqreturn_t mgsl_interrupt(int irq, void *dev_id)
1732 mgsl_isr_receive_dma(info); 1728 mgsl_isr_receive_dma(info);
1733 1729
1734 if ( info->isr_overflow ) { 1730 if ( info->isr_overflow ) {
1735 printk(KERN_ERR"%s(%d):%s isr overflow irq=%d\n", 1731 printk(KERN_ERR "%s(%d):%s isr overflow irq=%d\n",
1736 __FILE__,__LINE__,info->device_name, irq); 1732 __FILE__, __LINE__, info->device_name, info->irq_level);
1737 usc_DisableMasterIrqBit(info); 1733 usc_DisableMasterIrqBit(info);
1738 usc_DisableDmaInterrupts(info,DICR_MASTER); 1734 usc_DisableDmaInterrupts(info,DICR_MASTER);
1739 break; 1735 break;
@@ -1755,8 +1751,9 @@ static irqreturn_t mgsl_interrupt(int irq, void *dev_id)
1755 spin_unlock(&info->irq_spinlock); 1751 spin_unlock(&info->irq_spinlock);
1756 1752
1757 if ( debug_level >= DEBUG_LEVEL_ISR ) 1753 if ( debug_level >= DEBUG_LEVEL_ISR )
1758 printk("%s(%d):mgsl_interrupt(%d)exit.\n", 1754 printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)exit.\n",
1759 __FILE__,__LINE__,irq); 1755 __FILE__, __LINE__, info->irq_level);
1756
1760 return IRQ_HANDLED; 1757 return IRQ_HANDLED;
1761} /* end of mgsl_interrupt() */ 1758} /* end of mgsl_interrupt() */
1762 1759