V4L/DVB (5831): stradis: use ARRAY_SIZE
authorTrent Piepho <xyzzy@speakeasy.org>
Thu, 5 Jul 2007 22:04:27 +0000 (19:04 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 18 Jul 2007 17:24:42 +0000 (14:24 -0300)
sizeof(palette2fmt) / sizeof(u32) => ARRAY_SIZE(palette2fmt)

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/stradis.c

index 3e736be5de84496305cb1ac53767881be4df6955..eb220461ac77a8e9f973dae81f837ee4ae54a198 100644 (file)
@@ -1321,7 +1321,7 @@ static int saa_ioctl(struct inode *inode, struct file *file,
                        u32 format;
                        if (copy_from_user(&p, arg, sizeof(p)))
                                return -EFAULT;
-                       if (p.palette < sizeof(palette2fmt) / sizeof(u32)) {
+                       if (p.palette < ARRAY_SIZE(palette2fmt)) {
                                format = palette2fmt[p.palette];
                                saa->win.color_fmt = format;
                                saawrite(format | 0x60,