diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 10:47:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:25 -0400 |
commit | 1792f68b0eb464a9bc84e7d182e2ab4d00541c8c (patch) | |
tree | 623d7e56231ef8dedc685e6b0511c63162313f7a | |
parent | e6574f2fbecdb8af807169d345c10131ae060a88 (diff) |
V4L/DVB (11375): v4l2: use v4l2_i2c_new_probed_subdev_addr where appropriate.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/bt8xx/bttv-cards.c | 20 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 9 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-i2c.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 7 | ||||
-rw-r--r-- | drivers/media/video/vino.c | 11 |
5 files changed, 18 insertions, 35 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index ced777084ca0..58fb93ee5500 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -3640,21 +3640,13 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3640 | it really is a msp3400, so it will return NULL when the device | 3640 | it really is a msp3400, so it will return NULL when the device |
3641 | found is really something else (e.g. a tea6300). */ | 3641 | found is really something else (e.g. a tea6300). */ |
3642 | if (!bttv_tvcards[btv->c.type].no_msp34xx) { | 3642 | if (!bttv_tvcards[btv->c.type].no_msp34xx) { |
3643 | static const unsigned short addrs[] = { | 3643 | btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev, |
3644 | I2C_ADDR_MSP3400 >> 1, | 3644 | &btv->c.i2c_adap, "msp3400", "msp3400", |
3645 | I2C_CLIENT_END | 3645 | I2C_ADDR_MSP3400 >> 1); |
3646 | }; | ||
3647 | |||
3648 | btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev, | ||
3649 | &btv->c.i2c_adap, "msp3400", "msp3400", addrs); | ||
3650 | } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { | 3646 | } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { |
3651 | static const unsigned short addrs[] = { | 3647 | btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev, |
3652 | I2C_ADDR_MSP3400_ALT >> 1, | 3648 | &btv->c.i2c_adap, "msp3400", "msp3400", |
3653 | I2C_CLIENT_END | 3649 | I2C_ADDR_MSP3400_ALT >> 1); |
3654 | }; | ||
3655 | |||
3656 | btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev, | ||
3657 | &btv->c.i2c_adap, "msp3400", "msp3400", addrs); | ||
3658 | } | 3650 | } |
3659 | 3651 | ||
3660 | /* If we found a msp34xx, then we're done. */ | 3652 | /* If we found a msp34xx, then we're done. */ |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index d7d4d2a6ed9d..61afa89f7b11 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1888,12 +1888,9 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1888 | if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) { | 1888 | if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) { |
1889 | /* This probes for a tda9874 as is used on some | 1889 | /* This probes for a tda9874 as is used on some |
1890 | Pixelview Ultra boards. */ | 1890 | Pixelview Ultra boards. */ |
1891 | static const unsigned short i2c_addr[] = { | 1891 | v4l2_i2c_new_probed_subdev_addr(&core->v4l2_dev, |
1892 | 0xb0 >> 1, I2C_CLIENT_END | 1892 | &core->i2c_adap, |
1893 | }; | 1893 | "tvaudio", "tvaudio", 0xb0 >> 1); |
1894 | |||
1895 | v4l2_i2c_new_probed_subdev(&core->v4l2_dev, &core->i2c_adap, | ||
1896 | "tvaudio", "tvaudio", i2c_addr); | ||
1897 | } | 1894 | } |
1898 | 1895 | ||
1899 | switch (core->boardnr) { | 1896 | switch (core->boardnr) { |
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 1a289fd33cd4..9e3d32b8004c 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c | |||
@@ -181,10 +181,8 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx) | |||
181 | if (!hw_addrs[idx]) | 181 | if (!hw_addrs[idx]) |
182 | return -1; | 182 | return -1; |
183 | if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { | 183 | if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { |
184 | unsigned short addrs[2] = { hw_addrs[idx], I2C_CLIENT_END }; | 184 | sd = v4l2_i2c_new_probed_subdev_addr(&itv->v4l2_dev, |
185 | 185 | adap, mod, type, hw_addrs[idx]); | |
186 | sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev, | ||
187 | adap, mod, type, addrs); | ||
188 | } else { | 186 | } else { |
189 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 187 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, |
190 | adap, mod, type, hw_addrs[idx]); | 188 | adap, mod, type, hw_addrs[idx]); |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 234f530f0d74..0bb09f1723d1 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -991,12 +991,11 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
991 | } | 991 | } |
992 | 992 | ||
993 | if (saa7134_boards[dev->board].rds_addr) { | 993 | if (saa7134_boards[dev->board].rds_addr) { |
994 | unsigned short addrs[2] = { 0, I2C_CLIENT_END }; | ||
995 | struct v4l2_subdev *sd; | 994 | struct v4l2_subdev *sd; |
996 | 995 | ||
997 | addrs[0] = saa7134_boards[dev->board].rds_addr; | 996 | sd = v4l2_i2c_new_probed_subdev_addr(&dev->v4l2_dev, |
998 | sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 997 | &dev->i2c_adap, "saa6588", "saa6588", |
999 | "saa6588", "saa6588", addrs); | 998 | saa7134_boards[dev->board].rds_addr); |
1000 | if (sd) | 999 | if (sd) |
1001 | printk(KERN_INFO "%s: found RDS decoder\n", dev->name); | 1000 | printk(KERN_INFO "%s: found RDS decoder\n", dev->name); |
1002 | } | 1001 | } |
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 94343758ff5f..4912696c4a74 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -4266,7 +4266,6 @@ static int vino_init_channel_settings(struct vino_channel_settings *vcs, | |||
4266 | 4266 | ||
4267 | static int __init vino_module_init(void) | 4267 | static int __init vino_module_init(void) |
4268 | { | 4268 | { |
4269 | unsigned short addr[] = { 0, I2C_CLIENT_END }; | ||
4270 | int ret; | 4269 | int ret; |
4271 | 4270 | ||
4272 | printk(KERN_INFO "SGI VINO driver version %s\n", | 4271 | printk(KERN_INFO "SGI VINO driver version %s\n", |
@@ -4336,14 +4335,12 @@ static int __init vino_module_init(void) | |||
4336 | } | 4335 | } |
4337 | vino_init_stage++; | 4336 | vino_init_stage++; |
4338 | 4337 | ||
4339 | addr[0] = 0x45; | ||
4340 | vino_drvdata->decoder = | 4338 | vino_drvdata->decoder = |
4341 | v4l2_i2c_new_probed_subdev(&vino_drvdata->v4l2_dev, | 4339 | v4l2_i2c_new_probed_subdev_addr(&vino_drvdata->v4l2_dev, |
4342 | &vino_i2c_adapter, "saa7191", "saa7191", addr); | 4340 | &vino_i2c_adapter, "saa7191", "saa7191", 0x45); |
4343 | addr[0] = 0x2b; | ||
4344 | vino_drvdata->camera = | 4341 | vino_drvdata->camera = |
4345 | v4l2_i2c_new_probed_subdev(&vino_drvdata->v4l2_dev, | 4342 | v4l2_i2c_new_probed_subdev_addr(&vino_drvdata->v4l2_dev, |
4346 | &vino_i2c_adapter, "indycam", "indycam", addr); | 4343 | &vino_i2c_adapter, "indycam", "indycam", 0x2b); |
4347 | 4344 | ||
4348 | dprintk("init complete!\n"); | 4345 | dprintk("init complete!\n"); |
4349 | 4346 | ||