Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261309
b: refs/heads/master
c: 595a93a
h: refs/heads/master
i:
  261307: 4db4a8f
v: v3
  • Loading branch information
Jonathan Corbet authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent a8fc1c0 commit f6062f3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 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: 1c68f889c3287bd9beedd23164804e7e09c6566b
refs/heads/master: 595a93a47a3b7dc1be84160fbd73b1406074f411
9 changes: 7 additions & 2 deletions trunk/drivers/media/video/marvell-ccic/cafe-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,13 @@ static struct i2c_algorithm cafe_smbus_algo = {

static int cafe_smbus_setup(struct cafe_camera *cam)
{
struct i2c_adapter *adap = &cam->mcam.i2c_adapter;
struct i2c_adapter *adap;
int ret;

adap = kzalloc(sizeof(*adap), GFP_KERNEL);
if (adap == NULL)
return -ENOMEM;
cam->mcam.i2c_adapter = adap;
cafe_smbus_enable_irq(cam);
adap->owner = THIS_MODULE;
adap->algo = &cafe_smbus_algo;
Expand All @@ -351,7 +355,8 @@ static int cafe_smbus_setup(struct cafe_camera *cam)

static void cafe_smbus_shutdown(struct cafe_camera *cam)
{
i2c_del_adapter(&cam->mcam.i2c_adapter);
i2c_del_adapter(cam->mcam.i2c_adapter);
kfree(cam->mcam.i2c_adapter);
}


Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/marvell-ccic/mcam-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ int mccic_register(struct mcam_camera *cam)
sensor_cfg.use_smbus = cam->use_smbus;
cam->sensor_addr = ov7670_info.addr;
cam->sensor = v4l2_i2c_new_subdev_board(&cam->v4l2_dev,
&cam->i2c_adapter, &ov7670_info, NULL);
cam->i2c_adapter, &ov7670_info, NULL);
if (cam->sensor == NULL) {
ret = -ENODEV;
goto out_unregister;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/marvell-ccic/mcam-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct mcam_camera {
* These fields should be set by the platform code prior to
* calling mcam_register().
*/
struct i2c_adapter i2c_adapter;
struct i2c_adapter *i2c_adapter;
unsigned char __iomem *regs;
spinlock_t dev_lock;
struct device *dev; /* For messages, dma alloc */
Expand Down

0 comments on commit f6062f3

Please sign in to comment.