diff options
author | Julia Lawall <julia@diku.dk> | 2008-11-12 21:18:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:34 -0500 |
commit | 802971257a3b897d2affd39e540be264bae89c3b (patch) | |
tree | bcfb454260c3b8ca052f76f84e130a1e50f8ac43 /drivers/media/video/saa7134/saa7134-tvaudio.c | |
parent | 292ee46107abc213fc073298aa6a838a595d2b78 (diff) |
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/)
// <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 'drivers/media/video/saa7134/saa7134-tvaudio.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-tvaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index c5d0b44c179e..76b16407b01e 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[] = { | |||
159 | .mode = TVAUDIO_FM_MONO, | 159 | .mode = TVAUDIO_FM_MONO, |
160 | } | 160 | } |
161 | }; | 161 | }; |
162 | #define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio)) | 162 | #define TVAUDIO ARRAY_SIZE(tvaudio) |
163 | 163 | ||
164 | /* ------------------------------------------------------------------ */ | 164 | /* ------------------------------------------------------------------ */ |
165 | 165 | ||