Commit 1067247f authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[media] V4L: soc_camera_platform: remove superfluous soc-camera client operations

Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 71f5ec84
...@@ -30,32 +30,12 @@ static struct soc_camera_platform_priv *get_priv(struct platform_device *pdev) ...@@ -30,32 +30,12 @@ static struct soc_camera_platform_priv *get_priv(struct platform_device *pdev)
return container_of(subdev, struct soc_camera_platform_priv, subdev); return container_of(subdev, struct soc_camera_platform_priv, subdev);
} }
static struct soc_camera_platform_info *get_info(struct soc_camera_device *icd)
{
struct platform_device *pdev =
to_platform_device(to_soc_camera_control(icd));
return pdev->dev.platform_data;
}
static int soc_camera_platform_s_stream(struct v4l2_subdev *sd, int enable) static int soc_camera_platform_s_stream(struct v4l2_subdev *sd, int enable)
{ {
struct soc_camera_platform_info *p = v4l2_get_subdevdata(sd); struct soc_camera_platform_info *p = v4l2_get_subdevdata(sd);
return p->set_capture(p, enable); return p->set_capture(p, enable);
} }
static int soc_camera_platform_set_bus_param(struct soc_camera_device *icd,
unsigned long flags)
{
return 0;
}
static unsigned long
soc_camera_platform_query_bus_param(struct soc_camera_device *icd)
{
struct soc_camera_platform_info *p = get_info(icd);
return p->bus_param;
}
static int soc_camera_platform_fill_fmt(struct v4l2_subdev *sd, static int soc_camera_platform_fill_fmt(struct v4l2_subdev *sd,
struct v4l2_mbus_framefmt *mf) struct v4l2_mbus_framefmt *mf)
{ {
...@@ -142,11 +122,6 @@ static struct v4l2_subdev_ops platform_subdev_ops = { ...@@ -142,11 +122,6 @@ static struct v4l2_subdev_ops platform_subdev_ops = {
.video = &platform_subdev_video_ops, .video = &platform_subdev_video_ops,
}; };
static struct soc_camera_ops soc_camera_platform_ops = {
.set_bus_param = soc_camera_platform_set_bus_param,
.query_bus_param = soc_camera_platform_query_bus_param,
};
static int soc_camera_platform_probe(struct platform_device *pdev) static int soc_camera_platform_probe(struct platform_device *pdev)
{ {
struct soc_camera_host *ici; struct soc_camera_host *ici;
...@@ -175,7 +150,7 @@ static int soc_camera_platform_probe(struct platform_device *pdev) ...@@ -175,7 +150,7 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
/* Set the control device reference */ /* Set the control device reference */
icd->control = &pdev->dev; icd->control = &pdev->dev;
icd->ops = &soc_camera_platform_ops; icd->ops = NULL;
ici = to_soc_camera_host(icd->parent); ici = to_soc_camera_host(icd->parent);
...@@ -190,7 +165,6 @@ static int soc_camera_platform_probe(struct platform_device *pdev) ...@@ -190,7 +165,6 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
return ret; return ret;
evdrs: evdrs:
icd->ops = NULL;
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
kfree(priv); kfree(priv);
return ret; return ret;
...@@ -199,11 +173,8 @@ static int soc_camera_platform_probe(struct platform_device *pdev) ...@@ -199,11 +173,8 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
static int soc_camera_platform_remove(struct platform_device *pdev) static int soc_camera_platform_remove(struct platform_device *pdev)
{ {
struct soc_camera_platform_priv *priv = get_priv(pdev); struct soc_camera_platform_priv *priv = get_priv(pdev);
struct soc_camera_platform_info *p = pdev->dev.platform_data;
struct soc_camera_device *icd = p->icd;
v4l2_device_unregister_subdev(&priv->subdev); v4l2_device_unregister_subdev(&priv->subdev);
icd->ops = NULL;
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
kfree(priv); kfree(priv);
return 0; return 0;
......
...@@ -21,7 +21,6 @@ struct soc_camera_platform_info { ...@@ -21,7 +21,6 @@ struct soc_camera_platform_info {
const char *format_name; const char *format_name;
unsigned long format_depth; unsigned long format_depth;
struct v4l2_mbus_framefmt format; struct v4l2_mbus_framefmt format;
unsigned long bus_param;
unsigned long mbus_param; unsigned long mbus_param;
enum v4l2_mbus_type mbus_type; enum v4l2_mbus_type mbus_type;
struct soc_camera_device *icd; struct soc_camera_device *icd;
......
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