summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cpia2
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-06-05 05:20:56 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-06-05 05:20:56 -0300
commit59ceda70b6355498b5e7d77209cbcf39e2c32721 (patch)
tree02843d39734ceb23a1942aac15d471be48f34cab /linux/drivers/media/video/cpia2
parent24174e21e72f42c7480e136c96addf3280d1669f (diff)
downloadmediapointer-dvb-s2-59ceda70b6355498b5e7d77209cbcf39e2c32721.tar.gz
mediapointer-dvb-s2-59ceda70b6355498b5e7d77209cbcf39e2c32721.tar.bz2
Replace C code with calls to ARRAY_SIZE macro.
From: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cpia2')
-rw-r--r--linux/drivers/media/video/cpia2/cpia2_v4l.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cpia2/cpia2_v4l.c b/linux/drivers/media/video/cpia2/cpia2_v4l.c
index 1bda7ad9d..92778cd1d 100644
--- a/linux/drivers/media/video/cpia2/cpia2_v4l.c
+++ b/linux/drivers/media/video/cpia2/cpia2_v4l.c
@@ -105,7 +105,7 @@ static struct control_menu_info framerate_controls[] =
{ CPIA2_VP_FRAMERATE_25, "25 fps" },
{ CPIA2_VP_FRAMERATE_30, "30 fps" },
};
-#define NUM_FRAMERATE_CONTROLS (sizeof(framerate_controls)/sizeof(framerate_controls[0]))
+#define NUM_FRAMERATE_CONTROLS (ARRAY_SIZE(framerate_controls))
static struct control_menu_info flicker_controls[] =
{
@@ -113,7 +113,7 @@ static struct control_menu_info flicker_controls[] =
{ FLICKER_50, "50 Hz" },
{ FLICKER_60, "60 Hz" },
};
-#define NUM_FLICKER_CONTROLS (sizeof(flicker_controls)/sizeof(flicker_controls[0]))
+#define NUM_FLICKER_CONTROLS (ARRAY_SIZE(flicker_controls))
static struct control_menu_info lights_controls[] =
{
@@ -122,7 +122,7 @@ static struct control_menu_info lights_controls[] =
{ 128, "Bottom" },
{ 192, "Both" },
};
-#define NUM_LIGHTS_CONTROLS (sizeof(lights_controls)/sizeof(lights_controls[0]))
+#define NUM_LIGHTS_CONTROLS (ARRAY_SIZE(lights_controls))
#define GPIO_LIGHTS_MASK 192
static struct v4l2_queryctrl controls[] = {
@@ -235,7 +235,7 @@ static struct v4l2_queryctrl controls[] = {
.default_value = 0,
},
};
-#define NUM_CONTROLS (sizeof(controls)/sizeof(controls[0]))
+#define NUM_CONTROLS (ARRAY_SIZE(controls))
/******************************************************************************