1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-19 07:48:06 +02:00

tools/lib/misctxrx.c (flush_interrupts): don't fall back to reading IRQ_STATUS

We now implement atrf_interrupt_wait in all drivers and don't need
the dubious fallback anymore.
This commit is contained in:
Werner Almesberger 2011-06-20 20:48:15 -03:00
parent 9952a20fda
commit 76707d6b37

View File

@ -41,12 +41,13 @@ static void die(int sig)
void flush_interrupts(struct atrf_dsc *dsc)
{
/*
* If the driver doesn't support atrf_interrupt_wait, we use
* atrf_reg_read.
*/
if (atrf_interrupt_wait(dsc, 1) < 0)
atrf_reg_read(dsc, REG_IRQ_STATUS);
int res;
res = atrf_interrupt_wait(dsc, 1);
if (res < 0) {
fprintf(stderr, "atrf_interrupt_wait returns %d\n", res);
exit(1);
}
}