Skip to content

Commit

Permalink
sh: intc: Fix up initializers for gcc 4.5.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Nov 9, 2010
1 parent a7bcf21 commit 99870bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/sh_intc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 99870bd

Please sign in to comment.