aboutsummaryrefslogtreecommitdiffstats
path: root/arch/v850/kernel/gbus_int.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-10 01:44:30 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 10:51:24 -0800
commit81d79bec348ab06cba9ae9fc03eb015b6b83703a (patch)
tree2a2d17b93cbbf18f66726037621838eb0897a166 /arch/v850/kernel/gbus_int.c
parent[PATCH] uml: x86_64 ptrace fixes (diff)
downloadlinux-dev-81d79bec348ab06cba9ae9fc03eb015b6b83703a.tar.xz
linux-dev-81d79bec348ab06cba9ae9fc03eb015b6b83703a.zip
[PATCH] V850: user ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in linux/kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--arch/v850/kernel/gbus_int.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c
index 25d636e79e6a..b2bcc251f65b 100644
--- a/arch/v850/kernel/gbus_int.c
+++ b/arch/v850/kernel/gbus_int.c
@@ -16,6 +16,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/signal.h>
+#include <linux/kernel.h>
#include <asm/machdep.h>
@@ -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];