From fe971071a89c5c5184fc9f3482c7a8e997cf0520 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 9 Jan 2006 20:54:02 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/amiserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char/amiserial.c') diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index a124f8c5d06..10c81ecdace 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c @@ -116,7 +116,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout); static struct serial_state rs_table[1]; -#define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state)) +#define NR_PORTS ARRAY_SIZE(rs_table) /* * tmp_buf is used as a temporary buffer by serial_write. We need to -- cgit v1.2.3