From 76707d6b378a70fe4fb33d9d3a5e39bfa2fcb1ca Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 20 Jun 2011 20:48:15 -0300 Subject: [PATCH] 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. --- tools/lib/misctxrx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/lib/misctxrx.c b/tools/lib/misctxrx.c index eb5ddcd..5dbf996 100644 --- a/tools/lib/misctxrx.c +++ b/tools/lib/misctxrx.c @@ -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); + } }