aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mxb.c
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/mxb.c
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/mxb.c')
-rw-r--r--drivers/media/video/mxb.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
index 238bb40ae098..6a52b1d5f7ba 100644
--- a/drivers/media/video/mxb.c
+++ b/drivers/media/video/mxb.c
@@ -168,13 +168,20 @@ static int mxb_probe(struct saa7146_dev *dev)
168 return -EFAULT; 168 return -EFAULT;
169 } 169 }
170 170
171 mxb->saa7111a = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "saa7115", "saa7111", I2C_SAA7111A); 171 mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
172 mxb->tea6420_1 = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tea6420", "tea6420", I2C_TEA6420_1); 172 "saa7115", "saa7111", I2C_SAA7111A);
173 mxb->tea6420_2 = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tea6420", "tea6420", I2C_TEA6420_2); 173 mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
174 mxb->tea6415c = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tea6415c", "tea6415c", I2C_TEA6415C); 174 "tea6420", "tea6420", I2C_TEA6420_1);
175 mxb->tda9840 = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tda9840", "tda9840", I2C_TDA9840); 175 mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
176 mxb->tuner = v4l2_i2c_new_subdev(&mxb->i2c_adapter, "tuner", "tuner", I2C_TUNER); 176 "tea6420", "tea6420", I2C_TEA6420_2);
177 if (v4l2_i2c_new_subdev(&mxb->i2c_adapter, "saa5246a", "saa5246a", I2C_SAA5246A)) { 177 mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
178 "tea6415c", "tea6415c", I2C_TEA6415C);
179 mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
180 "tda9840", "tda9840", I2C_TDA9840);
181 mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
182 "tuner", "tuner", I2C_TUNER);
183 if (v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
184 "saa5246a", "saa5246a", I2C_SAA5246A)) {
178 printk(KERN_INFO "mxb: found teletext decoder\n"); 185 printk(KERN_INFO "mxb: found teletext decoder\n");
179 } 186 }
180 187