Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226410
b: refs/heads/master
c: f7b74f7
h: refs/heads/master
v: v3
  • Loading branch information
David Cohen authored and Mauro Carvalho Chehab committed Dec 31, 2010
1 parent 9b4656a commit 3cecf1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: 9804ed9e840c461f88b290dea43173e3eed37102
refs/heads/master: f7b74f76a3a5bcad4d2e8db76834253a63977545
13 changes: 5 additions & 8 deletions trunk/drivers/media/video/ov9640.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include "ov9640.h"

#define to_ov9640_sensor(sd) container_of(sd, struct ov9640_priv, subdev)

/* default register setup */
static const struct ov9640_reg ov9640_regs_dflt[] = {
{ OV9640_COM5, OV9640_COM5_SYSCLK | OV9640_COM5_LONGEXP },
Expand Down Expand Up @@ -308,9 +310,7 @@ static unsigned long ov9640_query_bus_param(struct soc_camera_device *icd)
/* Get status of additional camera capabilities */
static int ov9640_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct ov9640_priv *priv = container_of(i2c_get_clientdata(client),
struct ov9640_priv, subdev);
struct ov9640_priv *priv = to_ov9640_sensor(sd);

switch (ctrl->id) {
case V4L2_CID_VFLIP:
Expand All @@ -327,8 +327,7 @@ static int ov9640_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
static int ov9640_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct ov9640_priv *priv = container_of(i2c_get_clientdata(client),
struct ov9640_priv, subdev);
struct ov9640_priv *priv = to_ov9640_sensor(sd);

int ret = 0;

Expand Down Expand Up @@ -360,9 +359,7 @@ static int ov9640_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
static int ov9640_g_chip_ident(struct v4l2_subdev *sd,
struct v4l2_dbg_chip_ident *id)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct ov9640_priv *priv = container_of(i2c_get_clientdata(client),
struct ov9640_priv, subdev);
struct ov9640_priv *priv = to_ov9640_sensor(sd);

id->ident = priv->model;
id->revision = priv->revision;
Expand Down

0 comments on commit 3cecf1c

Please sign in to comment.