提交 ba2cf982 编写于 作者: T Trent Piepho 提交者: Mauro Carvalho Chehab

V4L/DVB (5831): stradis: use ARRAY_SIZE

sizeof(palette2fmt) / sizeof(u32) => ARRAY_SIZE(palette2fmt)
Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 59800555
...@@ -1321,7 +1321,7 @@ static int saa_ioctl(struct inode *inode, struct file *file, ...@@ -1321,7 +1321,7 @@ static int saa_ioctl(struct inode *inode, struct file *file,
u32 format; u32 format;
if (copy_from_user(&p, arg, sizeof(p))) if (copy_from_user(&p, arg, sizeof(p)))
return -EFAULT; return -EFAULT;
if (p.palette < sizeof(palette2fmt) / sizeof(u32)) { if (p.palette < ARRAY_SIZE(palette2fmt)) {
format = palette2fmt[p.palette]; format = palette2fmt[p.palette];
saa->win.color_fmt = format; saa->win.color_fmt = format;
saawrite(format | 0x60, saawrite(format | 0x60,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册