Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 069b7479 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.



Since internal to v4l2 the ioctl prototype is the same regardless of it
being called through .ioctl or .unlocked_ioctl, we need to convert it all
to the long return type of unlocked_ioctl.

Thanks to Jean-Francois Moine for posting an initial patch for this and
thus bringing it to our attention.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4ab9203b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static int fops_release(struct file *file)
	return 0;
}

static int fops_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
static long fops_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
/*
	DEB_EE(("file:%p, cmd:%d, arg:%li\n", file, cmd, arg));
+3 −2
Original line number Diff line number Diff line
@@ -834,13 +834,14 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
 * copying is done already, arg is a kernel pointer.
 */

int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
long saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
{
	struct saa7146_fh *fh  = file->private_data;
	struct saa7146_dev *dev = fh->dev;
	struct saa7146_vv *vv = dev->vv_data;

	int err = 0, result = 0, ee = 0;
	long err = 0;
	int result = 0, ee = 0;

	struct saa7146_use_ops *ops;
	struct videobuf_queue *q;
+1 −1
Original line number Diff line number Diff line
@@ -316,7 +316,7 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh)
	return 0;
}

static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
static long av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
	struct saa7146_dev *dev = fh->dev;
	struct av7110 *av7110 = (struct av7110*) dev->ext_priv;
+1 −1
Original line number Diff line number Diff line
@@ -1493,7 +1493,7 @@ static struct saa7146_extension_ioctls ioctls[] = {
	{0, 0}
};

static int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
static long av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
	struct saa7146_dev *dev = fh->dev;
	struct budget_av *budget_av = (struct budget_av *) dev->ext_priv;
+2 −2
Original line number Diff line number Diff line
@@ -396,7 +396,7 @@ static ssize_t ar_read(struct file *file, char *buf, size_t count, loff_t *ppos)
	return ret;
}

static int ar_do_ioctl(struct file *file, unsigned int cmd, void *arg)
static long ar_do_ioctl(struct file *file, unsigned int cmd, void *arg)
{
	struct video_device *dev = video_devdata(file);
	struct ar_device *ar = video_get_drvdata(dev);
@@ -539,7 +539,7 @@ static int ar_do_ioctl(struct file *file, unsigned int cmd, void *arg)
	return 0;
}

static int ar_ioctl(struct file *file, unsigned int cmd,
static long ar_ioctl(struct file *file, unsigned int cmd,
		    unsigned long arg)
{
	return video_usercopy(file, cmd, arg, ar_do_ioctl);
Loading