Skip to content

Commit 0934d94

Browse files
Hans VerkuilMauro Carvalho Chehab
authored andcommitted
[media] soc_camera: remove the now obsolete struct soc_camera_ops
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [g.liakhovetski@gmx.de: mt9m001 hunk moved to an earlier patch] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent 41efcd7 commit 0934d94

6 files changed

Lines changed: 0 additions & 25 deletions

File tree

‎drivers/media/video/imx074.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ static int imx074_probe(struct i2c_client *client,
437437

438438
v4l2_i2c_subdev_init(&priv->subdev, client, &imx074_subdev_ops);
439439

440-
icd->ops = NULL;
441440
priv->fmt = &imx074_colour_fmts[0];
442441

443442
ret = imx074_video_probe(icd, client);

‎drivers/media/video/mt9t112.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,8 +1095,6 @@ static int mt9t112_probe(struct i2c_client *client,
10951095

10961096
v4l2_i2c_subdev_init(&priv->subdev, client, &mt9t112_subdev_ops);
10971097

1098-
icd->ops = NULL;
1099-
11001098
ret = mt9t112_camera_probe(icd, client);
11011099
if (ret)
11021100
kfree(priv);

‎drivers/media/video/ov5642.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,6 @@ static int ov5642_probe(struct i2c_client *client,
942942

943943
v4l2_i2c_subdev_init(&priv->subdev, client, &ov5642_subdev_ops);
944944

945-
icd->ops = NULL;
946945
priv->fmt = &ov5642_colour_fmts[0];
947946

948947
ret = ov5642_video_probe(icd, client);

‎drivers/media/video/soc_camera_platform.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
150150
/* Set the control device reference */
151151
icd->control = &pdev->dev;
152152

153-
icd->ops = NULL;
154-
155153
ici = to_soc_camera_host(icd->parent);
156154

157155
v4l2_subdev_init(&priv->subdev, &platform_subdev_ops);

‎drivers/media/video/tw9910.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,6 @@ static int tw9910_probe(struct i2c_client *client,
921921

922922
v4l2_i2c_subdev_init(&priv->subdev, client, &tw9910_subdev_ops);
923923

924-
icd->ops = NULL;
925924
icd->iface = icl->bus_id;
926925

927926
ret = tw9910_video_probe(icd, client);

‎include/media/soc_camera.h‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ struct soc_camera_device {
3939
unsigned char iface; /* Host number */
4040
unsigned char devnum; /* Device number per host */
4141
struct soc_camera_sense *sense; /* See comment in struct definition */
42-
struct soc_camera_ops *ops;
4342
struct video_device *vdev;
4443
struct v4l2_ctrl_handler ctrl_handler;
4544
const struct soc_camera_format_xlate *current_fmt;
@@ -192,11 +191,6 @@ struct soc_camera_format_xlate {
192191
const struct soc_mbus_pixelfmt *host_fmt;
193192
};
194193

195-
struct soc_camera_ops {
196-
const struct v4l2_queryctrl *controls;
197-
int num_controls;
198-
};
199-
200194
#define SOCAM_SENSE_PCLK_CHANGED (1 << 0)
201195

202196
/**
@@ -223,18 +217,6 @@ struct soc_camera_sense {
223217
unsigned long pixel_clock;
224218
};
225219

226-
static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
227-
struct soc_camera_ops *ops, int id)
228-
{
229-
int i;
230-
231-
for (i = 0; i < ops->num_controls; i++)
232-
if (ops->controls[i].id == id)
233-
return &ops->controls[i];
234-
235-
return NULL;
236-
}
237-
238220
#define SOCAM_DATAWIDTH(x) BIT((x) - 1)
239221
#define SOCAM_DATAWIDTH_4 SOCAM_DATAWIDTH(4)
240222
#define SOCAM_DATAWIDTH_8 SOCAM_DATAWIDTH(8)

0 commit comments

Comments
 (0)