V4L/DVB (13465): Davinci VPFE Capture: Take i2c adapter id through platform data
authorVaibhav Hiremath <hvaibhav@ti.com>
Mon, 9 Nov 2009 12:14:16 +0000 (09:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:42:01 +0000 (18:42 -0200)
The I2C adapter ID is actually depends on Board and may vary, Davinci
uses id=1, but in case of AM3517 id=3.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/davinci/vpfe_capture.c

index c704a26..86f7e75 100644 (file)
@@ -1978,8 +1978,7 @@ static __init int vpfe_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, vpfe_dev);
        /* set driver private data */
        video_set_drvdata(vpfe_dev->video_dev, vpfe_dev);
-       i2c_adap = i2c_get_adapter(1);
-       vpfe_cfg = pdev->dev.platform_data;
+       i2c_adap = i2c_get_adapter(vpfe_cfg->i2c_adapter_id);
        num_subdevs = vpfe_cfg->num_subdevs;
        vpfe_dev->sd = kmalloc(sizeof(struct v4l2_subdev *) * num_subdevs,
                                GFP_KERNEL);