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>
This commit is contained in:
parent
e6574f2fbe
commit
1792f68b0e
@ -3640,21 +3640,13 @@ void __devinit bttv_init_card2(struct bttv *btv)
|
|||||||
it really is a msp3400, so it will return NULL when the device
|
it really is a msp3400, so it will return NULL when the device
|
||||||
found is really something else (e.g. a tea6300). */
|
found is really something else (e.g. a tea6300). */
|
||||||
if (!bttv_tvcards[btv->c.type].no_msp34xx) {
|
if (!bttv_tvcards[btv->c.type].no_msp34xx) {
|
||||||
static const unsigned short addrs[] = {
|
btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev,
|
||||||
I2C_ADDR_MSP3400 >> 1,
|
&btv->c.i2c_adap, "msp3400", "msp3400",
|
||||||
I2C_CLIENT_END
|
I2C_ADDR_MSP3400 >> 1);
|
||||||
};
|
|
||||||
|
|
||||||
btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
|
|
||||||
&btv->c.i2c_adap, "msp3400", "msp3400", addrs);
|
|
||||||
} else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
|
} else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
|
||||||
static const unsigned short addrs[] = {
|
btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev,
|
||||||
I2C_ADDR_MSP3400_ALT >> 1,
|
&btv->c.i2c_adap, "msp3400", "msp3400",
|
||||||
I2C_CLIENT_END
|
I2C_ADDR_MSP3400_ALT >> 1);
|
||||||
};
|
|
||||||
|
|
||||||
btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
|
|
||||||
&btv->c.i2c_adap, "msp3400", "msp3400", addrs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we found a msp34xx, then we're done. */
|
/* If we found a msp34xx, then we're done. */
|
||||||
|
@ -1888,12 +1888,9 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
|
|||||||
if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) {
|
if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) {
|
||||||
/* This probes for a tda9874 as is used on some
|
/* This probes for a tda9874 as is used on some
|
||||||
Pixelview Ultra boards. */
|
Pixelview Ultra boards. */
|
||||||
static const unsigned short i2c_addr[] = {
|
v4l2_i2c_new_probed_subdev_addr(&core->v4l2_dev,
|
||||||
0xb0 >> 1, I2C_CLIENT_END
|
&core->i2c_adap,
|
||||||
};
|
"tvaudio", "tvaudio", 0xb0 >> 1);
|
||||||
|
|
||||||
v4l2_i2c_new_probed_subdev(&core->v4l2_dev, &core->i2c_adap,
|
|
||||||
"tvaudio", "tvaudio", i2c_addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (core->boardnr) {
|
switch (core->boardnr) {
|
||||||
|
@ -181,10 +181,8 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
|
|||||||
if (!hw_addrs[idx])
|
if (!hw_addrs[idx])
|
||||||
return -1;
|
return -1;
|
||||||
if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) {
|
if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) {
|
||||||
unsigned short addrs[2] = { hw_addrs[idx], I2C_CLIENT_END };
|
sd = v4l2_i2c_new_probed_subdev_addr(&itv->v4l2_dev,
|
||||||
|
adap, mod, type, hw_addrs[idx]);
|
||||||
sd = v4l2_i2c_new_probed_subdev(&itv->v4l2_dev,
|
|
||||||
adap, mod, type, addrs);
|
|
||||||
} else {
|
} else {
|
||||||
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
||||||
adap, mod, type, hw_addrs[idx]);
|
adap, mod, type, hw_addrs[idx]);
|
||||||
|
@ -991,12 +991,11 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (saa7134_boards[dev->board].rds_addr) {
|
if (saa7134_boards[dev->board].rds_addr) {
|
||||||
unsigned short addrs[2] = { 0, I2C_CLIENT_END };
|
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
|
|
||||||
addrs[0] = saa7134_boards[dev->board].rds_addr;
|
sd = v4l2_i2c_new_probed_subdev_addr(&dev->v4l2_dev,
|
||||||
sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
&dev->i2c_adap, "saa6588", "saa6588",
|
||||||
"saa6588", "saa6588", addrs);
|
saa7134_boards[dev->board].rds_addr);
|
||||||
if (sd)
|
if (sd)
|
||||||
printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
|
printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
|
||||||
}
|
}
|
||||||
|
@ -4266,7 +4266,6 @@ static int vino_init_channel_settings(struct vino_channel_settings *vcs,
|
|||||||
|
|
||||||
static int __init vino_module_init(void)
|
static int __init vino_module_init(void)
|
||||||
{
|
{
|
||||||
unsigned short addr[] = { 0, I2C_CLIENT_END };
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printk(KERN_INFO "SGI VINO driver version %s\n",
|
printk(KERN_INFO "SGI VINO driver version %s\n",
|
||||||
@ -4336,14 +4335,12 @@ static int __init vino_module_init(void)
|
|||||||
}
|
}
|
||||||
vino_init_stage++;
|
vino_init_stage++;
|
||||||
|
|
||||||
addr[0] = 0x45;
|
|
||||||
vino_drvdata->decoder =
|
vino_drvdata->decoder =
|
||||||
v4l2_i2c_new_probed_subdev(&vino_drvdata->v4l2_dev,
|
v4l2_i2c_new_probed_subdev_addr(&vino_drvdata->v4l2_dev,
|
||||||
&vino_i2c_adapter, "saa7191", "saa7191", addr);
|
&vino_i2c_adapter, "saa7191", "saa7191", 0x45);
|
||||||
addr[0] = 0x2b;
|
|
||||||
vino_drvdata->camera =
|
vino_drvdata->camera =
|
||||||
v4l2_i2c_new_probed_subdev(&vino_drvdata->v4l2_dev,
|
v4l2_i2c_new_probed_subdev_addr(&vino_drvdata->v4l2_dev,
|
||||||
&vino_i2c_adapter, "indycam", "indycam", addr);
|
&vino_i2c_adapter, "indycam", "indycam", 0x2b);
|
||||||
|
|
||||||
dprintk("init complete!\n");
|
dprintk("init complete!\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user