mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-25 18:57:11 +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:
parent
9952a20fda
commit
76707d6b37
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user