Patchwork [v2,2/4] ARM: exynos4210_pmu: changes in PRINT_DEBUG macro set.

login
register
mail settings
Submitter Maksim E. Kozlov
Date July 12, 2012, 4:54 p.m.
Message ID <1342112068-23345-3-git-send-email-m.kozlov@samsung.com>
Download mbox | patch
Permalink /patch/170730/
State New
Headers show

Comments

Maksim E. Kozlov - July 12, 2012, 4:54 p.m.
It make possible to set DEBUG_PMU and DEBUG_PMU_EXTEND
independently of each other

Signed-off-by: Maksim Kozlov <m.kozlov@samsung.com>
---
 hw/exynos4210_pmu.c |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

Patch

diff --git a/hw/exynos4210_pmu.c b/hw/exynos4210_pmu.c
index 2be7e08..26a726f 100644
--- a/hw/exynos4210_pmu.c
+++ b/hw/exynos4210_pmu.c
@@ -34,26 +34,37 @@ 
 #define DEBUG_PMU_EXTEND    0
 #endif
 
-#if DEBUG_PMU
-#define  PRINT_DEBUG(fmt, args...)  \
+#if DEBUG_PMU || DEBUG_PMU_EXTEND
+
+    #define  PRINT_DEBUG(fmt, args...)  \
         do { \
             fprintf(stderr, "  [%s:%d]   "fmt, __func__, __LINE__, ##args); \
         } while (0)
 
 #if DEBUG_PMU_EXTEND
-#define  PRINT_DEBUG_EXTEND(fmt, args...) \
+
+    #define  PRINT_DEBUG_EXTEND(fmt, args...) \
         do { \
             fprintf(stderr, "  [%s:%d]   "fmt, __func__, __LINE__, ##args); \
         } while (0)
 #else
-#define  PRINT_DEBUG_EXTEND(fmt, args...)  do {} while (0)
+    #define  PRINT_DEBUG_EXTEND(fmt, args...) \
+        do {} while (0)
 #endif /* EXTEND */
 
 #else
-#define  PRINT_DEBUG(fmt, args...)   do {} while (0)
-#define  PRINT_DEBUG_EXTEND(fmt, args...)  do {} while (0)
+    #define  PRINT_DEBUG(fmt, args...) \
+        do {} while (0)
+    #define  PRINT_DEBUG_EXTEND(fmt, args...) \
+        do {} while (0)
 #endif
 
+#define  PRINT_ERROR(fmt, args...)                                          \
+        do {                                                                \
+            fprintf(stderr, "  [%s:%d]   "fmt, __func__, __LINE__, ##args); \
+        } while (0)
+
+
 /*
  *  Offsets for PMU registers
  */