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/serial167.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char/serial167.c') diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index c2deac968bd..a580748b92a 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c @@ -117,7 +117,7 @@ struct cyclades_port cy_port[] = { {-1 }, /* ttyS2 */ {-1 }, /* ttyS3 */ }; -#define NR_PORTS (sizeof(cy_port)/sizeof(struct cyclades_port)) +#define NR_PORTS ARRAY_SIZE(cy_port) /* * tmp_buf is used as a temporary buffer by serial_write. We need to -- cgit v1.2.3