ARM: common: fiq_debugger: peek the 0th char in ringbuf
Dima Zavin [Wed, 26 Oct 2011 04:24:10 +0000 (21:24 -0700)]
ringbuf_consume advances the tail ptr, so peek should always
just peek at offset 0

Change-Id: I8d3d22d2ec1e563d73b53ccbad302e6d74e64e53
Signed-off-by: Dima Zavin <dima@android.com>

arch/arm/common/fiq_debugger.c

index 46bf7af..71fa962 100644 (file)
@@ -578,7 +578,7 @@ static irqreturn_t debug_irq(int irq, void *dev)
                int i;
                int count = fiq_debugger_ringbuf_level(state->tty_rbuf);
                for (i = 0; i < count; i++) {
-                       int c = fiq_debugger_ringbuf_peek(state->tty_rbuf, i);
+                       int c = fiq_debugger_ringbuf_peek(state->tty_rbuf, 0);
                        tty_insert_flip_char(state->tty, c, TTY_NORMAL);
                        if (!fiq_debugger_ringbuf_consume(state->tty_rbuf, 1))
                                pr_warn("fiq tty failed to consume byte\n");