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>
This commit is contained in:
Родитель
807501475f
Коммит
0d626239ff
|
@ -124,8 +124,11 @@ static int rtc_probe(struct amba_device *dev, void *id)
|
||||||
|
|
||||||
xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
|
xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
|
||||||
|
|
||||||
|
/* note that 'dev' is merely used for irq disambiguation;
|
||||||
|
* it is not actually referenced in the irq handler
|
||||||
|
*/
|
||||||
ret = request_irq(dev->irq[0], arm_rtc_interrupt, IRQF_DISABLED,
|
ret = request_irq(dev->irq[0], arm_rtc_interrupt, IRQF_DISABLED,
|
||||||
"rtc-pl030", NULL);
|
"rtc-pl030", dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto map_out;
|
goto map_out;
|
||||||
|
|
||||||
|
|
|
@ -97,24 +97,20 @@ static void EnableSRAM(THINKPAD_BD_DATA * pBDData)
|
||||||
|
|
||||||
static irqreturn_t UartInterrupt(int irq, void *dev_id)
|
static irqreturn_t UartInterrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
int irqno = (int)(unsigned long) dev_id;
|
|
||||||
|
|
||||||
PRINTK_3(TRACE_TP3780I,
|
PRINTK_3(TRACE_TP3780I,
|
||||||
"tp3780i::UartInterrupt entry irq %x dev_id %p\n", irqno, dev_id);
|
"tp3780i::UartInterrupt entry irq %x dev_id %p\n", irq, dev_id);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t DspInterrupt(int irq, void *dev_id)
|
static irqreturn_t DspInterrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
int irqno = (int)(unsigned long) dev_id;
|
|
||||||
|
|
||||||
pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd;
|
pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd;
|
||||||
DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings;
|
DSP_3780I_CONFIG_SETTINGS *pSettings = &pDrvData->rBDData.rDspSettings;
|
||||||
unsigned short usDspBaseIO = pSettings->usDspBaseIO;
|
unsigned short usDspBaseIO = pSettings->usDspBaseIO;
|
||||||
unsigned short usIPCSource = 0, usIsolationMask, usPCNum;
|
unsigned short usIPCSource = 0, usIsolationMask, usPCNum;
|
||||||
|
|
||||||
PRINTK_3(TRACE_TP3780I,
|
PRINTK_3(TRACE_TP3780I,
|
||||||
"tp3780i::DspInterrupt entry irq %x dev_id %p\n", irqno, dev_id);
|
"tp3780i::DspInterrupt entry irq %x dev_id %p\n", irq, dev_id);
|
||||||
|
|
||||||
if (dsp3780I_GetIPCSource(usDspBaseIO, &usIPCSource) == 0) {
|
if (dsp3780I_GetIPCSource(usDspBaseIO, &usIPCSource) == 0) {
|
||||||
PRINTK_2(TRACE_TP3780I,
|
PRINTK_2(TRACE_TP3780I,
|
||||||
|
@ -365,16 +361,14 @@ int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData)
|
||||||
pSettings->bPllBypass = TP_CFG_PllBypass;
|
pSettings->bPllBypass = TP_CFG_PllBypass;
|
||||||
pSettings->usChipletEnable = TP_CFG_ChipletEnable;
|
pSettings->usChipletEnable = TP_CFG_ChipletEnable;
|
||||||
|
|
||||||
if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart",
|
if (request_irq(pSettings->usUartIrq, &UartInterrupt, 0, "mwave_uart", NULL)) {
|
||||||
(void *)(unsigned long) pSettings->usUartIrq)) {
|
|
||||||
PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could not get UART IRQ %x\n", pSettings->usUartIrq);
|
PRINTK_ERROR(KERN_ERR_MWAVE "tp3780i::tp3780I_EnableDSP: Error: Could not get UART IRQ %x\n", pSettings->usUartIrq);
|
||||||
goto exit_cleanup;
|
goto exit_cleanup;
|
||||||
} else { /* no conflict just release */
|
} else { /* no conflict just release */
|
||||||
free_irq(pSettings->usUartIrq, NULL);
|
free_irq(pSettings->usUartIrq, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i",
|
if (request_irq(pSettings->usDspIrq, &DspInterrupt, 0, "mwave_3780i", NULL)) {
|
||||||
(void *)(unsigned long) pSettings->usDspIrq)) {
|
|
||||||
PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ %x\n", pSettings->usDspIrq);
|
PRINTK_ERROR("tp3780i::tp3780I_EnableDSP: Error: Could not get 3780i IRQ %x\n", pSettings->usDspIrq);
|
||||||
goto exit_cleanup;
|
goto exit_cleanup;
|
||||||
} else {
|
} else {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче