aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mwave
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/mwave
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/mwave')
-rw-r--r--drivers/char/mwave/tp3780i.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c
index f282976daaac..37fe80df0b91 100644
--- a/drivers/char/mwave/tp3780i.c
+++ b/drivers/char/mwave/tp3780i.c
@@ -97,20 +97,24 @@ static void EnableSRAM(THINKPAD_BD_DATA * pBDData)
97 97
98static irqreturn_t UartInterrupt(int irq, void *dev_id) 98static irqreturn_t UartInterrupt(int irq, void *dev_id)
99{ 99{
100 int irqno = (int)(unsigned long) dev_id;
101
100 PRINTK_3(TRACE_TP3780I, 102 PRINTK_3(TRACE_TP3780I,
101 "tp3780i::UartInterrupt entry irq %x dev_id %p\n", irq, dev_id); 103 "tp3780i::UartInterrupt entry irq %x dev_id %p\n", irqno, dev_id);
102 return IRQ_HANDLED; 104 return IRQ_HANDLED;
103} 105}
104 106
105static irqreturn_t DspInterrupt(int irq, void *dev_id) 107static irqreturn_t DspInterrupt(int irq, void *dev_id)
106{ 108{
109 int irqno = (int)(unsigned long) dev_id;
110
107 pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; 111 pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd;
108 DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings; 112 DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings;
109 unsigned short usDspBaseIO = pSettings->usDspBaseIO; 113 unsigned short usDspBaseIO = pSettings->usDspBaseIO;
110 unsigned short usIPCSource = 0, usIsolationMask, usPCNum; 114 unsigned short usIPCSource = 0, usIsolationMask, usPCNum;
111 115
112 PRINTK_3(TRACE_TP3780I, 116 PRINTK_3(TRACE_TP3780I,
113 "tp3780i::DspInterrupt entry irq %x dev_id %p\n", irq, dev_id); 117 "tp3780i::DspInterrupt entry irq %x dev_id %p\n", irqno, dev_id);
114 118
115 if (dsp3780I_GetIPCSource(usDspBaseIO, &usIPCSource) == 0) { 119 if (dsp3780I_GetIPCSource(usDspBaseIO, &usIPCSource) == 0) {
116 PRINTK_2(TRACE_TP3780I, 120 PRINTK_2(TRACE_TP3780I,
@@ -361,14 +365,16 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
361 pSettings->bPllBypass = TP_CFG_PllBypass; 365 pSettings->bPllBypass = TP_CFG_PllBypass;
362 pSettings->usChipletEnable = TP_CFG_ChipletEnable; 366 pSettings->usChipletEnable = TP_CFG_ChipletEnable;
363 367
364 if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart", NULL)) { 368 if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart",
369 (void *)(unsigned long) pSettings->usUartIrq)) {
365 PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could not get UART IRQ %x\n", pSettings->usUartIrq); 370 PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could not get UART IRQ %x\n", pSettings->usUartIrq);
366 goto exit_cleanup; 371 goto exit_cleanup;
367 } else { /* no conflict just release */ 372 } else { /* no conflict just release */
368 free_irq(pSettings->usUartIrq, NULL); 373 free_irq(pSettings->usUartIrq, NULL);
369 } 374 }
370 375
371 if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i", NULL)) { 376 if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i",
377 (void *)(unsigned long) pSettings->usDspIrq)) {
372 PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ %x\n", pSettings->usDspIrq); 378 PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ %x\n", pSettings->usDspIrq);
373 goto exit_cleanup; 379 goto exit_cleanup;
374 } else { 380 } else {