From 802971257a3b897d2affd39e540be264bae89c3b Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Wed, 12 Nov 2008 23:18:21 -0300 Subject: V4L/DVB (9638): drivers/media: use ARRAY_SIZE ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type or the size of its first element. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @i@ @@ @depends on i using "paren.iso"@ type T; T[] E; @@ - (sizeof(E)/sizeof(E[...])) + ARRAY_SIZE(E) @depends on i using "paren.iso"@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) // Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7134/saa7134-tvaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/video/saa7134') diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index c5d0b44c179..76b16407b01 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -159,7 +159,7 @@ static struct saa7134_tvaudio tvaudio[] = { .mode = TVAUDIO_FM_MONO, } }; -#define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio)) +#define TVAUDIO ARRAY_SIZE(tvaudio) /* ------------------------------------------------------------------ */ -- cgit v1.2.3