Commit 4a62361f authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] v4l: omap4iss: Translate -ENOIOCTLCMD to -ENOTTY

Translating -ENOIOCTLCMD to -EINVAL is invalid, the correct ioctl return
value is -ENOTTY.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e43484e4
...@@ -571,7 +571,7 @@ iss_video_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropcap) ...@@ -571,7 +571,7 @@ iss_video_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropcap)
ret = v4l2_subdev_call(subdev, video, cropcap, cropcap); ret = v4l2_subdev_call(subdev, video, cropcap, cropcap);
mutex_unlock(&video->mutex); mutex_unlock(&video->mutex);
return ret == -ENOIOCTLCMD ? -EINVAL : ret; return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
} }
static int static int
...@@ -598,7 +598,7 @@ iss_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop) ...@@ -598,7 +598,7 @@ iss_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop)
format.which = V4L2_SUBDEV_FORMAT_ACTIVE; format.which = V4L2_SUBDEV_FORMAT_ACTIVE;
ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &format); ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &format);
if (ret < 0) if (ret < 0)
return ret == -ENOIOCTLCMD ? -EINVAL : ret; return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
crop->c.left = 0; crop->c.left = 0;
crop->c.top = 0; crop->c.top = 0;
...@@ -623,7 +623,7 @@ iss_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop) ...@@ -623,7 +623,7 @@ iss_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop)
ret = v4l2_subdev_call(subdev, video, s_crop, crop); ret = v4l2_subdev_call(subdev, video, s_crop, crop);
mutex_unlock(&video->mutex); mutex_unlock(&video->mutex);
return ret == -ENOIOCTLCMD ? -EINVAL : ret; return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment