Patchwork [v1,6/6] xilinx_timer: Fix a compile error if debug enabled

login
register
mail settings
Submitter Peter A. G. Crosthwaite
Date Sept. 17, 2012, 8:47 a.m.
Message ID <e037c7850739d0e4051692c607bc57de96040bc4.1347871393.git.peter.crosthwaite@petalogix.com>
Download mbox | patch
Permalink /patch/184320/
State New
Headers show

Comments

Peter A. G. Crosthwaite - Sept. 17, 2012, 8:47 a.m.
From: Chris Wulff <crwulff@gmail.com>

There was a missing include of qemu-log and a variable name in a printf was out
of date.

Signed-off-by: Chris Wulff <crwulff@gmail.com>
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
 hw/xilinx_timer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
index 9eb5ef7..2e48ca2 100644
--- a/hw/xilinx_timer.c
+++ b/hw/xilinx_timer.c
@@ -24,6 +24,7 @@ 
 
 #include "sysbus.h"
 #include "ptimer.h"
+#include "qemu-log.h"
 
 #define D(x)
 
@@ -189,7 +190,7 @@  static void timer_hit(void *opaque)
 {
     struct xlx_timer *xt = opaque;
     struct timerblock *t = xt->parent;
-    D(fprintf(stderr, "%s %d\n", __func__, timer));
+    D(fprintf(stderr, "%s %d\n", __func__, xt->nr));
     xt->regs[R_TCSR] |= TCSR_TINT;
 
     if (xt->regs[R_TCSR] & TCSR_ARHT)