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

From: Voss, Nikolaus
Date: Mon Apr 11 2011 - 05:38:54 EST


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 ;-).

It's a matter of taste after all.

Best regards,
Nikolaus Voss

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