diff options
-rw-r--r-- | drivers/media/video/gspca/conex.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/etoms.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca501.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca506.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/sunplus.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tveeprom.c | 4 |
7 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c index 8d48ea1742c2..eca003566ae3 100644 --- a/drivers/media/video/gspca/conex.c +++ b/drivers/media/video/gspca/conex.c | |||
@@ -820,7 +820,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
820 | 820 | ||
821 | cam = &gspca_dev->cam; | 821 | cam = &gspca_dev->cam; |
822 | cam->cam_mode = vga_mode; | 822 | cam->cam_mode = vga_mode; |
823 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 823 | cam->nmodes = ARRAY_SIZE(vga_mode); |
824 | 824 | ||
825 | sd->brightness = BRIGHTNESS_DEF; | 825 | sd->brightness = BRIGHTNESS_DEF; |
826 | sd->contrast = CONTRAST_DEF; | 826 | sd->contrast = CONTRAST_DEF; |
diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c index 2c20d06a03e8..c1461e63647f 100644 --- a/drivers/media/video/gspca/etoms.c +++ b/drivers/media/video/gspca/etoms.c | |||
@@ -635,10 +635,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
635 | sd->sensor = id->driver_info; | 635 | sd->sensor = id->driver_info; |
636 | if (sd->sensor == SENSOR_PAS106) { | 636 | if (sd->sensor == SENSOR_PAS106) { |
637 | cam->cam_mode = sif_mode; | 637 | cam->cam_mode = sif_mode; |
638 | cam->nmodes = sizeof sif_mode / sizeof sif_mode[0]; | 638 | cam->nmodes = ARRAY_SIZE(sif_mode); |
639 | } else { | 639 | } else { |
640 | cam->cam_mode = vga_mode; | 640 | cam->cam_mode = vga_mode; |
641 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 641 | cam->nmodes = ARRAY_SIZE(vga_mode); |
642 | gspca_dev->ctrl_dis = (1 << COLOR_IDX); | 642 | gspca_dev->ctrl_dis = (1 << COLOR_IDX); |
643 | } | 643 | } |
644 | sd->brightness = BRIGHTNESS_DEF; | 644 | sd->brightness = BRIGHTNESS_DEF; |
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index d48b27c648ca..b74a34218da0 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -1923,7 +1923,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1923 | 1923 | ||
1924 | cam = &gspca_dev->cam; | 1924 | cam = &gspca_dev->cam; |
1925 | cam->cam_mode = vga_mode; | 1925 | cam->cam_mode = vga_mode; |
1926 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 1926 | cam->nmodes = ARRAY_SIZE(vga_mode); |
1927 | sd->subtype = id->driver_info; | 1927 | sd->subtype = id->driver_info; |
1928 | sd->brightness = sd_ctrls[MY_BRIGHTNESS].qctrl.default_value; | 1928 | sd->brightness = sd_ctrls[MY_BRIGHTNESS].qctrl.default_value; |
1929 | sd->contrast = sd_ctrls[MY_CONTRAST].qctrl.default_value; | 1929 | sd->contrast = sd_ctrls[MY_CONTRAST].qctrl.default_value; |
diff --git a/drivers/media/video/gspca/spca506.c b/drivers/media/video/gspca/spca506.c index 3a0c893f942d..a199298a6419 100644 --- a/drivers/media/video/gspca/spca506.c +++ b/drivers/media/video/gspca/spca506.c | |||
@@ -286,7 +286,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
286 | 286 | ||
287 | cam = &gspca_dev->cam; | 287 | cam = &gspca_dev->cam; |
288 | cam->cam_mode = vga_mode; | 288 | cam->cam_mode = vga_mode; |
289 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 289 | cam->nmodes = ARRAY_SIZE(vga_mode); |
290 | sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; | 290 | sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; |
291 | sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value; | 291 | sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value; |
292 | sd->colors = sd_ctrls[SD_COLOR].qctrl.default_value; | 292 | sd->colors = sd_ctrls[SD_COLOR].qctrl.default_value; |
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index eabad47a3ca6..e9481fa77749 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c | |||
@@ -841,7 +841,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
841 | /* case BRIDGE_SPCA504: */ | 841 | /* case BRIDGE_SPCA504: */ |
842 | /* case BRIDGE_SPCA536: */ | 842 | /* case BRIDGE_SPCA536: */ |
843 | cam->cam_mode = vga_mode; | 843 | cam->cam_mode = vga_mode; |
844 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 844 | cam->nmodes =ARRAY_SIZE(vga_mode); |
845 | break; | 845 | break; |
846 | case BRIDGE_SPCA533: | 846 | case BRIDGE_SPCA533: |
847 | cam->cam_mode = custom_mode; | 847 | cam->cam_mode = custom_mode; |
@@ -852,7 +852,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
852 | break; | 852 | break; |
853 | case BRIDGE_SPCA504C: | 853 | case BRIDGE_SPCA504C: |
854 | cam->cam_mode = vga_mode2; | 854 | cam->cam_mode = vga_mode2; |
855 | cam->nmodes = sizeof vga_mode2 / sizeof vga_mode2[0]; | 855 | cam->nmodes = ARRAY_SIZE(vga_mode2); |
856 | break; | 856 | break; |
857 | } | 857 | } |
858 | sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; | 858 | sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; |
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 3d2756f7874a..cdf3357b4c9f 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -7574,7 +7574,7 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev, | |||
7574 | static const struct sd_desc sd_desc = { | 7574 | static const struct sd_desc sd_desc = { |
7575 | .name = MODULE_NAME, | 7575 | .name = MODULE_NAME, |
7576 | .ctrls = sd_ctrls, | 7576 | .ctrls = sd_ctrls, |
7577 | .nctrls = sizeof sd_ctrls / sizeof sd_ctrls[0], | 7577 | .nctrls = ARRAY_SIZE(sd_ctrls), |
7578 | .config = sd_config, | 7578 | .config = sd_config, |
7579 | .init = sd_init, | 7579 | .init = sd_init, |
7580 | .start = sd_start, | 7580 | .start = sd_start, |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index ac02808106c1..d533ea57e7b1 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -646,14 +646,14 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
646 | tvee->has_radio = 1; | 646 | tvee->has_radio = 1; |
647 | } | 647 | } |
648 | 648 | ||
649 | if (tuner1 < sizeof(hauppauge_tuner)/sizeof(struct HAUPPAUGE_TUNER)) { | 649 | if (tuner1 < ARRAY_SIZE(hauppauge_tuner)) { |
650 | tvee->tuner_type = hauppauge_tuner[tuner1].id; | 650 | tvee->tuner_type = hauppauge_tuner[tuner1].id; |
651 | t_name1 = hauppauge_tuner[tuner1].name; | 651 | t_name1 = hauppauge_tuner[tuner1].name; |
652 | } else { | 652 | } else { |
653 | t_name1 = "unknown"; | 653 | t_name1 = "unknown"; |
654 | } | 654 | } |
655 | 655 | ||
656 | if (tuner2 < sizeof(hauppauge_tuner)/sizeof(struct HAUPPAUGE_TUNER)) { | 656 | if (tuner2 < ARRAY_SIZE(hauppauge_tuner)) { |
657 | tvee->tuner2_type = hauppauge_tuner[tuner2].id; | 657 | tvee->tuner2_type = hauppauge_tuner[tuner2].id; |
658 | t_name2 = hauppauge_tuner[tuner2].name; | 658 | t_name2 = hauppauge_tuner[tuner2].name; |
659 | } else { | 659 | } else { |