diff options
author | Jeff Garzik <jeff@garzik.org> | 2008-04-24 08:35:37 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-24 08:35:37 -0400 |
commit | 0d626239ffe515a64a6b53c70896796f621c635c (patch) | |
tree | 453091db20907cf7baef72ffe75792aeeb038150 /drivers/char/mwave | |
parent | 807501475fce0ebe68baedf87f202c3e4ee0d12c (diff) |
arm/mach-integrator/time.c, mwave: revert portions of recent irq cleanups
The recent irq cleanups for arch/arm/mach-integrator/time.c and
drivers/char/mwave/tp3780i.c changed the request_irq() dev_id
parameter, but neglected to change the matching free_irq() parameter,
thus creating a bug upon irq de-registration.
Given that the impetus for the changes is not yet accepted upstream,
it is best to revert the irq cleanups.
Mostly. A comment is added to time.c to reduce future confusion,
of type that led to my time.c cleanup in the first place.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/char/mwave')
-rw-r--r-- | drivers/char/mwave/tp3780i.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c index 37fe80df0b91..f282976daaac 100644 --- a/drivers/char/mwave/tp3780i.c +++ b/drivers/char/mwave/tp3780i.c | |||
@@ -97,24 +97,20 @@ static void EnableSRAM(THINKPAD_BD_DATA * pBDData) | |||
97 | 97 | ||
98 | static irqreturn_t UartInterrupt(int irq, void *dev_id) | 98 | static irqreturn_t UartInterrupt(int irq, void *dev_id) |
99 | { | 99 | { |
100 | int irqno = (int)(unsigned long) dev_id; | ||
101 | |||
102 | PRINTK_3(TRACE_TP3780I, | 100 | PRINTK_3(TRACE_TP3780I, |
103 | "tp3780i::UartInterrupt entry irq %x dev_id %p\n", irqno, dev_id); | 101 | "tp3780i::UartInterrupt entry irq %x dev_id %p\n", irq, dev_id); |
104 | return IRQ_HANDLED; | 102 | return IRQ_HANDLED; |
105 | } | 103 | } |
106 | 104 | ||
107 | static irqreturn_t DspInterrupt(int irq, void *dev_id) | 105 | static irqreturn_t DspInterrupt(int irq, void *dev_id) |
108 | { | 106 | { |
109 | int irqno = (int)(unsigned long) dev_id; | ||
110 | |||
111 | pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; | 107 | pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; |
112 | DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings; | 108 | DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings; |
113 | unsigned short usDspBaseIO = pSettings->usDspBaseIO; | 109 | unsigned short usDspBaseIO = pSettings->usDspBaseIO; |
114 | unsigned short usIPCSource = 0, usIsolationMask, usPCNum; | 110 | unsigned short usIPCSource = 0, usIsolationMask, usPCNum; |
115 | 111 | ||
116 | PRINTK_3(TRACE_TP3780I, | 112 | PRINTK_3(TRACE_TP3780I, |
117 | "tp3780i::DspInterrupt entry irq %x dev_id %p\n", irqno, dev_id); | 113 | "tp3780i::DspInterrupt entry irq %x dev_id %p\n", irq, dev_id); |
118 | 114 | ||
119 | if (dsp3780I_GetIPCSource(usDspBaseIO, &usIPCSource) == 0) { | 115 | if (dsp3780I_GetIPCSource(usDspBaseIO, &usIPCSource) == 0) { |
120 | PRINTK_2(TRACE_TP3780I, | 116 | PRINTK_2(TRACE_TP3780I, |
@@ -365,16 +361,14 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData) | |||
365 | pSettings->bPllBypass = TP_CFG_PllBypass; | 361 | pSettings->bPllBypass = TP_CFG_PllBypass; |
366 | pSettings->usChipletEnable = TP_CFG_ChipletEnable; | 362 | pSettings->usChipletEnable = TP_CFG_ChipletEnable; |
367 | 363 | ||
368 | if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart", | 364 | if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart", NULL)) { |
369 | (void *)(unsigned long) pSettings->usUartIrq)) { | ||
370 | PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could not get UART IRQ %x\n", pSettings->usUartIrq); | 365 | PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could not get UART IRQ %x\n", pSettings->usUartIrq); |
371 | goto exit_cleanup; | 366 | goto exit_cleanup; |
372 | } else { /* no conflict just release */ | 367 | } else { /* no conflict just release */ |
373 | free_irq(pSettings->usUartIrq, NULL); | 368 | free_irq(pSettings->usUartIrq, NULL); |
374 | } | 369 | } |
375 | 370 | ||
376 | if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i", | 371 | if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i", NULL)) { |
377 | (void *)(unsigned long) pSettings->usDspIrq)) { | ||
378 | PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ %x\n", pSettings->usDspIrq); | 372 | PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ %x\n", pSettings->usDspIrq); |
379 | goto exit_cleanup; | 373 | goto exit_cleanup; |
380 | } else { | 374 | } else { |