summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-13 02:18:21 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-13 02:18:21 +0000
commitf2dd6debc2a05925196c72e6341cbde336752caf (patch)
treeca894097773c763778dfebc4af6f524a400e4193 /linux/drivers/media/video/saa7134/saa7134-tvaudio.c
parent0dd5f609f5faa9eabdd86966e9bf7dd9d8d45b05 (diff)
downloadmediapointer-dvb-s2-f2dd6debc2a05925196c72e6341cbde336752caf.tar.gz
mediapointer-dvb-s2-f2dd6debc2a05925196c72e6341cbde336752caf.tar.bz2
drivers/media: use ARRAY_SIZE
From: Julia Lawall <julia@diku.dk> 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/) // <smpl> @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) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-tvaudio.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index f7a3f1d0a..477d9e091 100644
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -161,7 +161,7 @@ static struct saa7134_tvaudio tvaudio[] = {
.mode = TVAUDIO_FM_MONO,
}
};
-#define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio))
+#define TVAUDIO ARRAY_SIZE(tvaudio)
/* ------------------------------------------------------------------ */