Re: [PATCH] drivers/spi/atmel_spi.c: prevent premature irqs

From: Nicolas Ferre
Date: Mon Apr 18 2011 - 04:29:30 EST


Le 11/04/2011 11:38, Voss, Nikolaus :
> Hi,
>
>> What about something like this?
>>
>> /* disable all interrupts to avoid premature irq triggering */
>> spi_writel(as, IDR, 0xffffffff);
>
> I implemented it this way the first time, but on a second approach I used
> the more specific variant.
>
> That way it is kept symmetric to the irq enable part in the transfer method
> which enables no more than the irqs disabled in my patch. And I generally
> feel better when not writing live values to don't care bits ;-).

That makes sense. I add my ACK.

Bye,
--
Nicolas Ferre

--
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/