linux/drivers/media/common/saa7146
Jérémy Lefaure e40d14a897 media: use ARRAY_SIZE
Using the ARRAY_SIZE macro improves the readability of the code. Also,
it is not always useful to use a variable to store this constant
calculated at compile time.

Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-08 10:11:00 -05:00
..
Kconfig
Makefile
saa7146_core.c [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00
saa7146_fops.c media: saa7146: Convert timers to use timer_setup() 2017-10-31 06:40:08 -04:00
saa7146_hlp.c [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00
saa7146_i2c.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
saa7146_vbi.c treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts 2017-11-21 16:35:54 -08:00
saa7146_video.c media: use ARRAY_SIZE 2017-12-08 10:11:00 -05:00