提交 f6c773b4 编写于 作者: S Sakari Ailus 提交者: Mauro Carvalho Chehab

media: staging: atomisp: i2c: Drop g_parm support in sensor drivers

These drivers already support g_frame_interval. Therefore just dropping
g_parm is enough.
Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 718df0a8
......@@ -1204,32 +1204,6 @@ static int gc0310_s_config(struct v4l2_subdev *sd,
return ret;
}
static int gc0310_g_parm(struct v4l2_subdev *sd,
struct v4l2_streamparm *param)
{
struct gc0310_device *dev = to_gc0310_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
if (!param)
return -EINVAL;
if (param->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
dev_err(&client->dev, "unsupported buffer type.\n");
return -EINVAL;
}
memset(param, 0, sizeof(*param));
param->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (dev->fmt_idx >= 0 && dev->fmt_idx < N_RES) {
param->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
param->parm.capture.timeperframe.numerator = 1;
param->parm.capture.timeperframe.denominator =
gc0310_res[dev->fmt_idx].fps;
}
return 0;
}
static int gc0310_g_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_frame_interval *interval)
{
......@@ -1288,7 +1262,6 @@ static const struct v4l2_subdev_sensor_ops gc0310_sensor_ops = {
static const struct v4l2_subdev_video_ops gc0310_video_ops = {
.s_stream = gc0310_s_stream,
.g_parm = gc0310_g_parm,
.g_frame_interval = gc0310_g_frame_interval,
};
......
......@@ -944,32 +944,6 @@ static int gc2235_s_config(struct v4l2_subdev *sd,
return ret;
}
static int gc2235_g_parm(struct v4l2_subdev *sd,
struct v4l2_streamparm *param)
{
struct gc2235_device *dev = to_gc2235_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
if (!param)
return -EINVAL;
if (param->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
dev_err(&client->dev, "unsupported buffer type.\n");
return -EINVAL;
}
memset(param, 0, sizeof(*param));
param->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (dev->fmt_idx >= 0 && dev->fmt_idx < N_RES) {
param->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
param->parm.capture.timeperframe.numerator = 1;
param->parm.capture.timeperframe.denominator =
gc2235_res[dev->fmt_idx].fps;
}
return 0;
}
static int gc2235_g_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_frame_interval *interval)
{
......@@ -1027,7 +1001,6 @@ static const struct v4l2_subdev_sensor_ops gc2235_sensor_ops = {
static const struct v4l2_subdev_video_ops gc2235_video_ops = {
.s_stream = gc2235_s_stream,
.g_parm = gc2235_g_parm,
.g_frame_interval = gc2235_g_frame_interval,
};
......
......@@ -1280,32 +1280,6 @@ static int ov2680_s_config(struct v4l2_subdev *sd,
return ret;
}
static int ov2680_g_parm(struct v4l2_subdev *sd,
struct v4l2_streamparm *param)
{
struct ov2680_device *dev = to_ov2680_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
if (!param)
return -EINVAL;
if (param->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
dev_err(&client->dev, "unsupported buffer type.\n");
return -EINVAL;
}
memset(param, 0, sizeof(*param));
param->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (dev->fmt_idx >= 0 && dev->fmt_idx < N_RES) {
param->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
param->parm.capture.timeperframe.numerator = 1;
param->parm.capture.timeperframe.denominator =
ov2680_res[dev->fmt_idx].fps;
}
return 0;
}
static int ov2680_g_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_frame_interval *interval)
{
......@@ -1359,7 +1333,6 @@ static int ov2680_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
static const struct v4l2_subdev_video_ops ov2680_video_ops = {
.s_stream = ov2680_s_stream,
.g_parm = ov2680_g_parm,
.g_frame_interval = ov2680_g_frame_interval,
};
......
......@@ -1083,32 +1083,6 @@ static int ov2722_s_config(struct v4l2_subdev *sd,
return ret;
}
static int ov2722_g_parm(struct v4l2_subdev *sd,
struct v4l2_streamparm *param)
{
struct ov2722_device *dev = to_ov2722_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
if (!param)
return -EINVAL;
if (param->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
dev_err(&client->dev, "unsupported buffer type.\n");
return -EINVAL;
}
memset(param, 0, sizeof(*param));
param->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (dev->fmt_idx >= 0 && dev->fmt_idx < N_RES) {
param->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
param->parm.capture.timeperframe.numerator = 1;
param->parm.capture.timeperframe.denominator =
ov2722_res[dev->fmt_idx].fps;
}
return 0;
}
static int ov2722_g_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_frame_interval *interval)
{
......@@ -1167,7 +1141,6 @@ static const struct v4l2_subdev_sensor_ops ov2722_sensor_ops = {
static const struct v4l2_subdev_video_ops ov2722_video_ops = {
.s_stream = ov2722_s_stream,
.g_parm = ov2722_g_parm,
.g_frame_interval = ov2722_g_frame_interval,
};
......
......@@ -1805,32 +1805,6 @@ static int ov5693_s_config(struct v4l2_subdev *sd,
return ret;
}
static int ov5693_g_parm(struct v4l2_subdev *sd,
struct v4l2_streamparm *param)
{
struct ov5693_device *dev = to_ov5693_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
if (!param)
return -EINVAL;
if (param->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
dev_err(&client->dev, "unsupported buffer type.\n");
return -EINVAL;
}
memset(param, 0, sizeof(*param));
param->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (dev->fmt_idx >= 0 && dev->fmt_idx < N_RES) {
param->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
param->parm.capture.timeperframe.numerator = 1;
param->parm.capture.timeperframe.denominator =
ov5693_res[dev->fmt_idx].fps;
}
return 0;
}
static int ov5693_g_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_frame_interval *interval)
{
......@@ -1873,7 +1847,6 @@ static int ov5693_enum_frame_size(struct v4l2_subdev *sd,
static const struct v4l2_subdev_video_ops ov5693_video_ops = {
.s_stream = ov5693_s_stream,
.g_parm = ov5693_g_parm,
.g_frame_interval = ov5693_g_frame_interval,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册