aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cafe_ccic.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2011-01-08 07:08:02 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-19 11:45:30 -0200
commit3c7c9370fb645f4713e0fbbe69425d8db9b47a13 (patch)
treef7a0580c92bd37826f82aa87052b180addb25e4e /drivers/media/video/cafe_ccic.c
parent[media] saa7134: Kworld SBTVD: make both analog and digital to work (diff)
downloadlinux-dev-3c7c9370fb645f4713e0fbbe69425d8db9b47a13.tar.xz
linux-dev-3c7c9370fb645f4713e0fbbe69425d8db9b47a13.zip
[media] v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg()
The core.s_config op was meant for legacy drivers that needed to work with old pre-2.6.26 kernels. This is no longer relevant. Unfortunately, this op was incorrectly called from several drivers. Replace those occurences with proper i2c_board_info structs and call v4l2_i2c_new_subdev_board. After these changes v4l2_i2c_new_subdev_cfg() was no longer used, so remove that function as well. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r--drivers/media/video/cafe_ccic.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 49f1b8f1418e..55ffd60ffa7f 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -2001,6 +2001,11 @@ static int cafe_pci_probe(struct pci_dev *pdev,
.min_width = 320,
.min_height = 240,
};
+ struct i2c_board_info ov7670_info = {
+ .type = "ov7670",
+ .addr = 0x42,
+ .platform_data = &sensor_cfg,
+ };
/*
* Start putting together one of our big camera structures.
@@ -2062,9 +2067,9 @@ static int cafe_pci_probe(struct pci_dev *pdev,
if (dmi_check_system(olpc_xo1_dmi))
sensor_cfg.clock_speed = 45;
- cam->sensor_addr = 0x42;
- cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter,
- "ov7670", 0, &sensor_cfg, cam->sensor_addr, NULL);
+ cam->sensor_addr = ov7670_info.addr;
+ cam->sensor = v4l2_i2c_new_subdev_board(&cam->v4l2_dev, &cam->i2c_adapter,
+ &ov7670_info, NULL);
if (cam->sensor == NULL) {
ret = -ENODEV;
goto out_smbus;