Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273671
b: refs/heads/master
c: 1067247
h: refs/heads/master
i:
  273669: 609d7bc
  273667: b3d50cd
  273663: c2d625c
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent 4922619 commit 2e537c3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71f5ec8406e0d2f7c85bc1207df88207cf784377
refs/heads/master: 1067247f56c5a9325332148c0dea42a2aa7e718f
31 changes: 1 addition & 30 deletions trunk/drivers/media/video/soc_camera_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

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)
{
struct soc_camera_platform_info *p = v4l2_get_subdevdata(sd);
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,
struct v4l2_mbus_framefmt *mf)
{
Expand Down Expand Up @@ -142,11 +122,6 @@ static struct v4l2_subdev_ops platform_subdev_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)
{
struct soc_camera_host *ici;
Expand Down Expand Up @@ -175,7 +150,7 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
/* Set the control device reference */
icd->control = &pdev->dev;

icd->ops = &soc_camera_platform_ops;
icd->ops = NULL;

ici = to_soc_camera_host(icd->parent);

Expand All @@ -190,7 +165,6 @@ static int soc_camera_platform_probe(struct platform_device *pdev)
return ret;

evdrs:
icd->ops = NULL;
platform_set_drvdata(pdev, NULL);
kfree(priv);
return ret;
Expand All @@ -199,11 +173,8 @@ static int soc_camera_platform_probe(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_info *p = pdev->dev.platform_data;
struct soc_camera_device *icd = p->icd;

v4l2_device_unregister_subdev(&priv->subdev);
icd->ops = NULL;
platform_set_drvdata(pdev, NULL);
kfree(priv);
return 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/media/soc_camera_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ struct soc_camera_platform_info {
const char *format_name;
unsigned long format_depth;
struct v4l2_mbus_framefmt format;
unsigned long bus_param;
unsigned long mbus_param;
enum v4l2_mbus_type mbus_type;
struct soc_camera_device *icd;
Expand Down

0 comments on commit 2e537c3

Please sign in to comment.