Skip to contentSkip to conversation

pxa: clean code in hardware.h

PATCH New Haojian Zhuang 1 participant 1 message Mar 12, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pxa: clean code in hardware.h

Avoid too much conditional compilation in hardware.h.

---
 arch/arm/mach-pxa/include/mach/hardware.h |   27 ++++++---------------------
 1 files changed, 6 insertions(+), 21 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-pxa/include/mach/hardware.h
index 3d8d8cb..6694643 100644

arch/arm/mach-pxa/include/mach/hardware.h +6 -21
@@ -148,63 +148,48 @@
 #define __cpu_is_pxa27x(id)	(0)
 #endif
 
-#ifdef CONFIG_CPU_PXA300
+#ifdef CONFIG_PXA3xx
 #define __cpu_is_pxa300(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x688;				\
 	 })
-#else
-#define __cpu_is_pxa300(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA310
 #define __cpu_is_pxa310(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x689;				\
 	 })
-#else
-#define __cpu_is_pxa310(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA320
 #define __cpu_is_pxa320(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x603 || _id == 0x682;		\
 	 })
-#else
-#define __cpu_is_pxa320(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA930
 #define __cpu_is_pxa930(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x683;				\
 	 })
-#else
-#define __cpu_is_pxa930(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA935
 #define __cpu_is_pxa935(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x693;				\
 	 })
-#else
-#define __cpu_is_pxa935(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA950
 #define __cpu_is_pxa950(id)                             \
 	({                                              \
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x697;				\
 	 })
 #else
+#define __cpu_is_pxa300(id)	(0)
+#define __cpu_is_pxa310(id)	(0)
+#define __cpu_is_pxa320(id)	(0)
+#define __cpu_is_pxa930(id)	(0)
+#define __cpu_is_pxa935(id)	(0)
 #define __cpu_is_pxa950(id)	(0)
 #endif
 
Signature · 1 line
1.5.6.5