aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvision
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-01 02:57:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:24 -0400
commite6574f2fbecdb8af807169d345c10131ae060a88 (patch)
tree9923d1065397b9796a476cac238bacbdf1d820d1 /drivers/media/video/usbvision
parent868f985c2fb85b5f32785bb55a349d180a30f3d3 (diff)
V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on i2c_get_adapdata to return the v4l2_device. However, this is not always possible on embedded platforms. So modify the API to pass the v4l2_device pointer explicitly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/usbvision')
-rw-r--r--drivers/media/video/usbvision/usbvision-i2c.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c
index dd2f8f27c73b..83778267175d 100644
--- a/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/drivers/media/video/usbvision/usbvision-i2c.c
@@ -247,7 +247,8 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
247 switch (usbvision_device_data[usbvision->DevModel].Codec) { 247 switch (usbvision_device_data[usbvision->DevModel].Codec) {
248 case CODEC_SAA7113: 248 case CODEC_SAA7113:
249 case CODEC_SAA7111: 249 case CODEC_SAA7111:
250 v4l2_i2c_new_probed_subdev(&usbvision->i2c_adap, "saa7115", 250 v4l2_i2c_new_probed_subdev(&usbvision->v4l2_dev,
251 &usbvision->i2c_adap, "saa7115",
251 "saa7115_auto", saa711x_addrs); 252 "saa7115_auto", saa711x_addrs);
252 break; 253 break;
253 } 254 }
@@ -256,13 +257,15 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
256 enum v4l2_i2c_tuner_type type; 257 enum v4l2_i2c_tuner_type type;
257 struct tuner_setup tun_setup; 258 struct tuner_setup tun_setup;
258 259
259 sd = v4l2_i2c_new_probed_subdev(&usbvision->i2c_adap, "tuner", 260 sd = v4l2_i2c_new_probed_subdev(&usbvision->v4l2_dev,
261 &usbvision->i2c_adap, "tuner",
260 "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); 262 "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
261 /* depending on whether we found a demod or not, select 263 /* depending on whether we found a demod or not, select
262 the tuner type. */ 264 the tuner type. */
263 type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; 265 type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
264 266
265 sd = v4l2_i2c_new_probed_subdev(&usbvision->i2c_adap, "tuner", 267 sd = v4l2_i2c_new_probed_subdev(&usbvision->v4l2_dev,
268 &usbvision->i2c_adap, "tuner",
266 "tuner", v4l2_i2c_tuner_addrs(type)); 269 "tuner", v4l2_i2c_tuner_addrs(type));
267 270
268 if (usbvision->tuner_type != -1) { 271 if (usbvision->tuner_type != -1) {