sh: intc: Fix up initializers for gcc 4.5.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 8 Nov 2010 08:02:26 +0000 (17:02 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 9 Nov 2010 07:38:20 +0000 (16:38 +0900)
The _INTC_ARRAY() initializer presently does a NULL test which blows up
as a non-constant initializer under gcc 4.5. This switches over to a type
test to account for NULL initializers explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
include/linux/sh_intc.h

index f656d1a43dc0219ebfd43fddc7cfe2b86eded613..5812fefbcedf1ac2685760c1d40fff52076cf054 100644 (file)
@@ -79,7 +79,7 @@ struct intc_hw_desc {
        unsigned int nr_subgroups;
 };
 
-#define _INTC_ARRAY(a) a, a == NULL ? 0 : sizeof(a)/sizeof(*a)
+#define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a)
 
 #define INTC_HW_DESC(vectors, groups, mask_regs,       \
                     prio_regs, sense_regs, ack_regs)   \