mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-19 07:06:16 +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)
|
void flush_interrupts(struct atrf_dsc *dsc)
|
||||||
{
|
{
|
||||||
/*
|
int res;
|
||||||
* If the driver doesn't support atrf_interrupt_wait, we use
|
|
||||||
* atrf_reg_read.
|
res = atrf_interrupt_wait(dsc, 1);
|
||||||
*/
|
if (res < 0) {
|
||||||
if (atrf_interrupt_wait(dsc, 1) < 0)
|
fprintf(stderr, "atrf_interrupt_wait returns %d\n", res);
|
||||||
atrf_reg_read(dsc, REG_IRQ_STATUS);
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user