X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fv850%2Fkernel%2Fgbus_int.c;h=b2bcc251f65b8b1ec3c6c9a0d63845c25d99af69;hb=5b20311eeae7c5e7d9484cd0878ac756a20a78e4;hp=25d636e79e6acfe59be1fc933632ad894e880a21;hpb=db1a19b38f3a85f475b4ad716c71be133d8ca48e;p=linux-2.6 diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c index 25d636e79e..b2bcc251f6 100644 --- a/arch/v850/kernel/gbus_int.c +++ b/arch/v850/kernel/gbus_int.c @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -36,7 +37,7 @@ struct used_gint { { 1, GBUS_INT_PRIORITY_HIGH }, { 3, GBUS_INT_PRIORITY_LOW } }; -#define NUM_USED_GINTS (sizeof used_gint / sizeof used_gint[0]) +#define NUM_USED_GINTS ARRAY_SIZE(used_gint) /* A table of which GINT is used by each GBUS interrupts (they are assigned based on priority). */ @@ -231,8 +232,7 @@ struct gbus_int_irq_init gbus_irq_inits[] __initdata = { { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6}, { 0 } }; -#define NUM_GBUS_IRQ_INITS \ - ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1) +#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1) static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];