Commit d7306735 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: Remove a couple of not useful function wrappers

The __atomisp_reqbufs(), __atomisp_streamoff() are 1:1 wrappers for
the non __ prefixed functions now, drop these wrappers.

The atomisp_s_fmt_cap() wrapper is almost a 1:1 wrapper for
atomisp_set_fmt() adjust the latter to have the right function
prototype and drop the wrapper.
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent cf223056
......@@ -5167,8 +5167,9 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
return css_input_resolution_changed(asd, ffmt);
}
int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
int atomisp_set_fmt(struct file *file, void *unused, struct v4l2_format *f)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
struct atomisp_sub_device *asd = pipe->asd;
......
......@@ -266,7 +266,7 @@ int atomisp_get_sensor_mode_data(struct atomisp_sub_device *asd,
int atomisp_try_fmt(struct video_device *vdev, struct v4l2_pix_format *f,
bool *res_overflow);
int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f);
int atomisp_set_fmt(struct file *file, void *fh, struct v4l2_format *f);
int atomisp_set_shading_table(struct atomisp_sub_device *asd,
struct atomisp_shading_table *shading_table);
......
......@@ -836,18 +836,16 @@ static int atomisp_release(struct file *file)
__func__);
if (pipe->capq.streaming &&
__atomisp_streamoff(file, NULL, V4L2_BUF_TYPE_VIDEO_CAPTURE)) {
dev_err(isp->dev,
"atomisp_streamoff failed on release, driver bug");
atomisp_streamoff(file, NULL, V4L2_BUF_TYPE_VIDEO_CAPTURE)) {
dev_err(isp->dev, "atomisp_streamoff failed on release, driver bug");
goto done;
}
if (pipe->users)
goto done;
if (__atomisp_reqbufs(file, NULL, &req)) {
dev_err(isp->dev,
"atomisp_reqbufs failed on release, driver bug");
if (atomisp_reqbufs(file, NULL, &req)) {
dev_err(isp->dev, "atomisp_reqbufs failed on release, driver bug");
goto done;
}
......
......@@ -968,14 +968,6 @@ static int atomisp_g_fmt_cap(struct file *file, void *fh,
return atomisp_try_fmt_cap(file, fh, f);
}
static int atomisp_s_fmt_cap(struct file *file, void *fh,
struct v4l2_format *f)
{
struct video_device *vdev = video_devdata(file);
return atomisp_set_fmt(vdev, f);
}
/*
* Free videobuffer buffer priv data
*/
......@@ -1111,8 +1103,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
/*
* Initiate Memory Mapping or User Pointer I/O
*/
int __atomisp_reqbufs(struct file *file, void *fh,
struct v4l2_requestbuffers *req)
int atomisp_reqbufs(struct file *file, void *fh, struct v4l2_requestbuffers *req)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
......@@ -1184,12 +1175,6 @@ int __atomisp_reqbufs(struct file *file, void *fh,
return -ENOMEM;
}
int atomisp_reqbufs(struct file *file, void *fh,
struct v4l2_requestbuffers *req)
{
return __atomisp_reqbufs(file, fh, req);
}
/* application query the status of a buffer */
static int atomisp_querybuf(struct file *file, void *fh,
struct v4l2_buffer *buf)
......@@ -1793,7 +1778,7 @@ static int atomisp_streamon(struct file *file, void *fh,
return 0;
}
int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
int atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
......@@ -2015,12 +2000,6 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
return ret;
}
static int atomisp_streamoff(struct file *file, void *fh,
enum v4l2_buf_type type)
{
return __atomisp_streamoff(file, fh, type);
}
/*
* To get the current value of a control.
* applications initialize the id field of a struct v4l2_control and
......@@ -2806,7 +2785,7 @@ const struct v4l2_ioctl_ops atomisp_ioctl_ops = {
.vidioc_enum_fmt_vid_cap = atomisp_enum_fmt_cap,
.vidioc_try_fmt_vid_cap = atomisp_try_fmt_cap,
.vidioc_g_fmt_vid_cap = atomisp_g_fmt_cap,
.vidioc_s_fmt_vid_cap = atomisp_s_fmt_cap,
.vidioc_s_fmt_vid_cap = atomisp_set_fmt,
.vidioc_reqbufs = atomisp_reqbufs,
.vidioc_querybuf = atomisp_querybuf,
.vidioc_qbuf = atomisp_qbuf,
......
......@@ -39,12 +39,8 @@ int atomisp_pipe_check(struct atomisp_video_pipe *pipe, bool streaming_ok);
int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
uint16_t stream_id);
int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type);
int __atomisp_reqbufs(struct file *file, void *fh,
struct v4l2_requestbuffers *req);
int atomisp_reqbufs(struct file *file, void *fh,
struct v4l2_requestbuffers *req);
int atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type);
int atomisp_reqbufs(struct file *file, void *fh, struct v4l2_requestbuffers *req);
enum ia_css_pipe_id atomisp_get_css_pipe_id(struct atomisp_sub_device
*asd);
......
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