Skip to content

Commit

Permalink
V4L/DVB (5831): stradis: use ARRAY_SIZE
Browse files Browse the repository at this point in the history
sizeof(palette2fmt) / sizeof(u32) => ARRAY_SIZE(palette2fmt)

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent 5980055 commit ba2cf98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/stradis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ba2cf98

Please sign in to comment.