From: Trent Piepho Date: Thu, 5 Jul 2007 22:04:27 +0000 (-0300) Subject: V4L/DVB (5831): stradis: use ARRAY_SIZE X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ba2cf98249795f03792d1409a3b6aaa589ea0745;p=openwrt%2Fstaging%2Fblogic.git V4L/DVB (5831): stradis: use ARRAY_SIZE sizeof(palette2fmt) / sizeof(u32) => ARRAY_SIZE(palette2fmt) Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index 3e736be5de84..eb220461ac77 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c @@ -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,