diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-01-10 04:54:02 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 16:01:56 (GMT) |
commit | fe971071a89c5c5184fc9f3482c7a8e997cf0520 (patch) | |
tree | 74a29e80d5636255f33c750482497a32d8d3491f /drivers/char/vme_scc.c | |
parent | 3c6bee1d4037a5c569f30d40bd852a57ba250912 (diff) | |
download | linux-fe971071a89c5c5184fc9f3482c7a8e997cf0520.tar.xz |
[PATCH] drivers/char: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of ARRAY_SIZE.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/vme_scc.c')
-rw-r--r-- | drivers/char/vme_scc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index 19ba836..33e71e2 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c @@ -875,13 +875,13 @@ static int scc_open (struct tty_struct * tty, struct file * filp) local_irq_save(flags); #if defined(CONFIG_MVME147_SCC) || defined(CONFIG_MVME162_SCC) if (MACH_IS_MVME147 || MACH_IS_MVME16x) { - for (i=0; i<sizeof(mvme_init_tab)/sizeof(*mvme_init_tab); ++i) + for (i = 0; i < ARRAY_SIZE(mvme_init_tab); ++i) SCCwrite(mvme_init_tab[i].reg, mvme_init_tab[i].val); } #endif #if defined(CONFIG_BVME6000_SCC) if (MACH_IS_BVME6000) { - for (i=0; i<sizeof(bvme_init_tab)/sizeof(*bvme_init_tab); ++i) + for (i = 0; i < ARRAY_SIZE(bvme_init_tab); ++i) SCCwrite(bvme_init_tab[i].reg, bvme_init_tab[i].val); } #endif |