[media] cx231xx: replace open-coded ARRAY_SIZE with macro
authorJim Cromie <jim.cromie@gmail.com>
Tue, 10 Apr 2012 23:55:40 +0000 (20:55 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 15 May 2012 14:41:13 +0000 (11:41 -0300)
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx231xx/cx231xx-avcore.c

index 6e4bca251862d1bb87cb38f9be250a7172ef9315..b085a3c6dc048fb29514669046d4d145ee55351e 100644 (file)
@@ -1595,8 +1595,8 @@ void cx231xx_set_DIF_bandpass(struct cx231xx *dev, u32 if_freq,
        }
 
        cx231xx_info("Enter IF=%zd\n",
-                       sizeof(Dif_set_array)/sizeof(struct dif_settings));
-       for (i = 0; i < sizeof(Dif_set_array)/sizeof(struct dif_settings); i++) {
+                       ARRAY_SIZE(Dif_set_array));
+       for (i = 0; i < ARRAY_SIZE(Dif_set_array); i++) {
                if (Dif_set_array[i].if_freq == if_freq) {
                        vid_blk_write_word(dev,
                        Dif_set_array[i].register_address, Dif_set_array[i].value);