mirror of https://gitee.com/openkylin/linux.git
V4L/DVB (5831): stradis: use ARRAY_SIZE
sizeof(palette2fmt) / sizeof(u32) => ARRAY_SIZE(palette2fmt) Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
59800555f7
commit
ba2cf98249
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue