Commit 92ab7886119da6375a983713eedab444e32094f6

Authored by Mauro Carvalho Chehab
1 parent 902571aaa9

V4L/DVB (10110): v4l2-ioctl: Fix warnings when using .unlocked_ioctl = __video_ioctl2

This patch fixes this warning:

drivers/media/video/gspca/gspca.c:1811: warning: initialization from incompatible pointer type

The reason is that the returned argument should be a long, not an
integer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

drivers/media/video/v4l2-ioctl.c
... ... @@ -1852,7 +1852,7 @@
1852 1852 return ret;
1853 1853 }
1854 1854  
1855   -int __video_ioctl2(struct file *file,
  1855 +long __video_ioctl2(struct file *file,
1856 1856 unsigned int cmd, unsigned long arg)
1857 1857 {
1858 1858 char sbuf[128];
include/media/v4l2-ioctl.h
... ... @@ -297,7 +297,7 @@
297 297 /* Standard handlers for V4L ioctl's */
298 298  
299 299 /* This prototype is used on fops.unlocked_ioctl */
300   -extern int __video_ioctl2(struct file *file,
  300 +extern long __video_ioctl2(struct file *file,
301 301 unsigned int cmd, unsigned long arg);
302 302  
303 303 /* This prototype is used on fops.ioctl