mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue