Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273658
b: refs/heads/master
c: ff51345
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent cd90726 commit b70d67a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 47 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: 0b01e03e5af825303b609f65b7f1a14c07153f18
refs/heads/master: ff51345832628eb641805a01213aeae0bb4a23c1
48 changes: 2 additions & 46 deletions trunk/drivers/media/video/mt9t112.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,46 +742,6 @@ static int mt9t112_init_camera(const struct i2c_client *client)
return ret;
}

/************************************************************************
soc_camera_ops
************************************************************************/
static int mt9t112_set_bus_param(struct soc_camera_device *icd,
unsigned long flags)
{
struct soc_camera_link *icl = to_soc_camera_link(icd);
struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
struct mt9t112_priv *priv = to_mt9t112(client);

if (soc_camera_apply_sensor_flags(icl, flags) & SOCAM_PCLK_SAMPLE_RISING)
priv->flags |= PCLK_RISING;

return 0;
}

static unsigned long mt9t112_query_bus_param(struct soc_camera_device *icd)
{
struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
struct mt9t112_priv *priv = to_mt9t112(client);
struct soc_camera_link *icl = to_soc_camera_link(icd);
unsigned long flags = SOCAM_MASTER | SOCAM_VSYNC_ACTIVE_HIGH |
SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_HIGH;

flags |= (priv->info->flags & MT9T112_FLAG_PCLK_RISING_EDGE) ?
SOCAM_PCLK_SAMPLE_RISING : SOCAM_PCLK_SAMPLE_FALLING;

if (priv->info->flags & MT9T112_FLAG_DATAWIDTH_8)
flags |= SOCAM_DATAWIDTH_8;
else
flags |= SOCAM_DATAWIDTH_10;

return soc_camera_apply_sensor_flags(icl, flags);
}

static struct soc_camera_ops mt9t112_ops = {
.set_bus_param = mt9t112_set_bus_param,
.query_bus_param = mt9t112_query_bus_param,
};

/************************************************************************
v4l2_subdev_core_ops
************************************************************************/
Expand Down Expand Up @@ -1117,23 +1077,19 @@ static int mt9t112_probe(struct i2c_client *client,

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

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

ret = mt9t112_camera_probe(icd, client);
if (ret) {
icd->ops = NULL;
if (ret)
kfree(priv);
}

return ret;
}

static int mt9t112_remove(struct i2c_client *client)
{
struct mt9t112_priv *priv = to_mt9t112(client);
struct soc_camera_device *icd = client->dev.platform_data;

icd->ops = NULL;
kfree(priv);
return 0;
}
Expand Down

0 comments on commit b70d67a

Please sign in to comment.