Re: [PATCH] amba-pl011: clear previous interrupts beforerequest_irq

From: Shreshtha Kumar SAHU
Date: Thu Jan 19 2012 - 06:16:22 EST


On Wed, Jan 18, 2012 at 12:41:00 +0100, Alan Cox wrote:
> > /*
> > + * Clear previous interrupts before installing interrupt handler
> > + */
> > + spin_lock_irq(&uap->port.lock);
> > + uap->im = 0;
> > + writew(uap->im, uap->port.membase + UART011_IMSC);
> > + writew(0xffff, uap->port.membase + UART011_ICR);
> > + spin_unlock_irq(&uap->port.lock);
>
> I'm confused why you use spin_lock_irq before you've enabled the IRQ in
> the first place but looks fine.
>
> Alan
Yes, spin_lock_irq for the port is not required as request_irq is not yet
called for the port.

Thanks and Regards,
Shreshtha
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/