diff options
31 files changed, 90 insertions, 110 deletions
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c index 6a435786b63d..03829e6818bd 100644 --- a/drivers/media/radio/radio-si4713.c +++ b/drivers/media/radio/radio-si4713.c | |||
@@ -291,7 +291,7 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev) | |||
291 | goto unregister_v4l2_dev; | 291 | goto unregister_v4l2_dev; |
292 | } | 292 | } |
293 | 293 | ||
294 | sd = v4l2_i2c_new_subdev_board(&rsdev->v4l2_dev, adapter, NULL, | 294 | sd = v4l2_i2c_new_subdev_board(&rsdev->v4l2_dev, adapter, |
295 | pdata->subdev_board_info, NULL); | 295 | pdata->subdev_board_info, NULL); |
296 | if (!sd) { | 296 | if (!sd) { |
297 | dev_err(&pdev->dev, "Cannot get v4l2 subdevice\n"); | 297 | dev_err(&pdev->dev, "Cannot get v4l2 subdevice\n"); |
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index 0453816d4ec3..01be89fa5c78 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c | |||
@@ -212,7 +212,7 @@ void au0828_card_setup(struct au0828_dev *dev) | |||
212 | be abstracted out if we ever need to support a different | 212 | be abstracted out if we ever need to support a different |
213 | demod) */ | 213 | demod) */ |
214 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 214 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
215 | NULL, "au8522", 0x8e >> 1, NULL); | 215 | "au8522", 0x8e >> 1, NULL); |
216 | if (sd == NULL) | 216 | if (sd == NULL) |
217 | printk(KERN_ERR "analog subdev registration failed\n"); | 217 | printk(KERN_ERR "analog subdev registration failed\n"); |
218 | } | 218 | } |
@@ -221,7 +221,7 @@ void au0828_card_setup(struct au0828_dev *dev) | |||
221 | if (dev->board.tuner_type != TUNER_ABSENT) { | 221 | if (dev->board.tuner_type != TUNER_ABSENT) { |
222 | /* Load the tuner module, which does the attach */ | 222 | /* Load the tuner module, which does the attach */ |
223 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 223 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
224 | NULL, "tuner", dev->board.tuner_addr, NULL); | 224 | "tuner", dev->board.tuner_addr, NULL); |
225 | if (sd == NULL) | 225 | if (sd == NULL) |
226 | printk(KERN_ERR "tuner subdev registration fail\n"); | 226 | printk(KERN_ERR "tuner subdev registration fail\n"); |
227 | 227 | ||
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index 87d8b006ef77..49efcf660ba6 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -3529,7 +3529,7 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3529 | struct v4l2_subdev *sd; | 3529 | struct v4l2_subdev *sd; |
3530 | 3530 | ||
3531 | sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3531 | sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3532 | &btv->c.i2c_adap, NULL, "saa6588", 0, addrs); | 3532 | &btv->c.i2c_adap, "saa6588", 0, addrs); |
3533 | btv->has_saa6588 = (sd != NULL); | 3533 | btv->has_saa6588 = (sd != NULL); |
3534 | } | 3534 | } |
3535 | 3535 | ||
@@ -3554,7 +3554,7 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3554 | }; | 3554 | }; |
3555 | 3555 | ||
3556 | btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3556 | btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3557 | &btv->c.i2c_adap, NULL, "msp3400", 0, addrs); | 3557 | &btv->c.i2c_adap, "msp3400", 0, addrs); |
3558 | if (btv->sd_msp34xx) | 3558 | if (btv->sd_msp34xx) |
3559 | return; | 3559 | return; |
3560 | goto no_audio; | 3560 | goto no_audio; |
@@ -3568,7 +3568,7 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3568 | }; | 3568 | }; |
3569 | 3569 | ||
3570 | if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3570 | if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3571 | &btv->c.i2c_adap, NULL, "tda7432", 0, addrs)) | 3571 | &btv->c.i2c_adap, "tda7432", 0, addrs)) |
3572 | return; | 3572 | return; |
3573 | goto no_audio; | 3573 | goto no_audio; |
3574 | } | 3574 | } |
@@ -3576,7 +3576,7 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3576 | case 3: { | 3576 | case 3: { |
3577 | /* The user specified that we should probe for tvaudio */ | 3577 | /* The user specified that we should probe for tvaudio */ |
3578 | btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3578 | btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3579 | &btv->c.i2c_adap, NULL, "tvaudio", 0, tvaudio_addrs()); | 3579 | &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); |
3580 | if (btv->sd_tvaudio) | 3580 | if (btv->sd_tvaudio) |
3581 | return; | 3581 | return; |
3582 | goto no_audio; | 3582 | goto no_audio; |
@@ -3596,11 +3596,11 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3596 | found is really something else (e.g. a tea6300). */ | 3596 | found is really something else (e.g. a tea6300). */ |
3597 | if (!bttv_tvcards[btv->c.type].no_msp34xx) { | 3597 | if (!bttv_tvcards[btv->c.type].no_msp34xx) { |
3598 | btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3598 | btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3599 | &btv->c.i2c_adap, NULL, "msp3400", | 3599 | &btv->c.i2c_adap, "msp3400", |
3600 | 0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1)); | 3600 | 0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1)); |
3601 | } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { | 3601 | } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { |
3602 | btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3602 | btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3603 | &btv->c.i2c_adap, NULL, "msp3400", | 3603 | &btv->c.i2c_adap, "msp3400", |
3604 | 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1)); | 3604 | 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1)); |
3605 | } | 3605 | } |
3606 | 3606 | ||
@@ -3616,13 +3616,13 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3616 | }; | 3616 | }; |
3617 | 3617 | ||
3618 | if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3618 | if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3619 | &btv->c.i2c_adap, NULL, "tda7432", 0, addrs)) | 3619 | &btv->c.i2c_adap, "tda7432", 0, addrs)) |
3620 | return; | 3620 | return; |
3621 | } | 3621 | } |
3622 | 3622 | ||
3623 | /* Now see if we can find one of the tvaudio devices. */ | 3623 | /* Now see if we can find one of the tvaudio devices. */ |
3624 | btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3624 | btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3625 | &btv->c.i2c_adap, NULL, "tvaudio", 0, tvaudio_addrs()); | 3625 | &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); |
3626 | if (btv->sd_tvaudio) | 3626 | if (btv->sd_tvaudio) |
3627 | return; | 3627 | return; |
3628 | 3628 | ||
@@ -3646,13 +3646,13 @@ void __devinit bttv_init_tuner(struct bttv *btv) | |||
3646 | /* Load tuner module before issuing tuner config call! */ | 3646 | /* Load tuner module before issuing tuner config call! */ |
3647 | if (bttv_tvcards[btv->c.type].has_radio) | 3647 | if (bttv_tvcards[btv->c.type].has_radio) |
3648 | v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3648 | v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3649 | &btv->c.i2c_adap, NULL, "tuner", | 3649 | &btv->c.i2c_adap, "tuner", |
3650 | 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO)); | 3650 | 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO)); |
3651 | v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3651 | v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3652 | &btv->c.i2c_adap, NULL, "tuner", | 3652 | &btv->c.i2c_adap, "tuner", |
3653 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); | 3653 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); |
3654 | v4l2_i2c_new_subdev(&btv->c.v4l2_dev, | 3654 | v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
3655 | &btv->c.i2c_adap, NULL, "tuner", | 3655 | &btv->c.i2c_adap, "tuner", |
3656 | 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD)); | 3656 | 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD)); |
3657 | 3657 | ||
3658 | tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; | 3658 | tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; |
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 61a58d475b78..260c666ce931 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -2066,7 +2066,7 @@ static int cafe_pci_probe(struct pci_dev *pdev, | |||
2066 | 2066 | ||
2067 | cam->sensor_addr = 0x42; | 2067 | cam->sensor_addr = 0x42; |
2068 | cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter, | 2068 | cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter, |
2069 | NULL, "ov7670", 0, &sensor_cfg, cam->sensor_addr, NULL); | 2069 | "ov7670", 0, &sensor_cfg, cam->sensor_addr, NULL); |
2070 | if (cam->sensor == NULL) { | 2070 | if (cam->sensor == NULL) { |
2071 | ret = -ENODEV; | 2071 | ret = -ENODEV; |
2072 | goto out_smbus; | 2072 | goto out_smbus; |
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c index a09caf883170..e71a026f3419 100644 --- a/drivers/media/video/cx18/cx18-i2c.c +++ b/drivers/media/video/cx18/cx18-i2c.c | |||
@@ -122,15 +122,15 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) | |||
122 | if (hw == CX18_HW_TUNER) { | 122 | if (hw == CX18_HW_TUNER) { |
123 | /* special tuner group handling */ | 123 | /* special tuner group handling */ |
124 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, | 124 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, |
125 | adap, NULL, type, 0, cx->card_i2c->radio); | 125 | adap, type, 0, cx->card_i2c->radio); |
126 | if (sd != NULL) | 126 | if (sd != NULL) |
127 | sd->grp_id = hw; | 127 | sd->grp_id = hw; |
128 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, | 128 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, |
129 | adap, NULL, type, 0, cx->card_i2c->demod); | 129 | adap, type, 0, cx->card_i2c->demod); |
130 | if (sd != NULL) | 130 | if (sd != NULL) |
131 | sd->grp_id = hw; | 131 | sd->grp_id = hw; |
132 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, | 132 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, |
133 | adap, NULL, type, 0, cx->card_i2c->tv); | 133 | adap, type, 0, cx->card_i2c->tv); |
134 | if (sd != NULL) | 134 | if (sd != NULL) |
135 | sd->grp_id = hw; | 135 | sd->grp_id = hw; |
136 | return sd != NULL ? 0 : -1; | 136 | return sd != NULL ? 0 : -1; |
@@ -144,7 +144,7 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) | |||
144 | return -1; | 144 | return -1; |
145 | 145 | ||
146 | /* It's an I2C device other than an analog tuner or IR chip */ | 146 | /* It's an I2C device other than an analog tuner or IR chip */ |
147 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, NULL, type, hw_addrs[idx], | 147 | sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, type, hw_addrs[idx], |
148 | NULL); | 148 | NULL); |
149 | if (sd != NULL) | 149 | if (sd != NULL) |
150 | sd->grp_id = hw; | 150 | sd->grp_id = hw; |
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 56c2d8195ac6..2c78d188bb06 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -560,7 +560,7 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
560 | if (dev->board.decoder == CX231XX_AVDECODER) { | 560 | if (dev->board.decoder == CX231XX_AVDECODER) { |
561 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 561 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
562 | &dev->i2c_bus[0].i2c_adap, | 562 | &dev->i2c_bus[0].i2c_adap, |
563 | NULL, "cx25840", 0x88 >> 1, NULL); | 563 | "cx25840", 0x88 >> 1, NULL); |
564 | if (dev->sd_cx25840 == NULL) | 564 | if (dev->sd_cx25840 == NULL) |
565 | cx231xx_info("cx25840 subdev registration failure\n"); | 565 | cx231xx_info("cx25840 subdev registration failure\n"); |
566 | cx25840_call(dev, core, load_fw); | 566 | cx25840_call(dev, core, load_fw); |
@@ -571,7 +571,7 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
571 | if (dev->board.tuner_type != TUNER_ABSENT) { | 571 | if (dev->board.tuner_type != TUNER_ABSENT) { |
572 | dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 572 | dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
573 | &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, | 573 | &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, |
574 | NULL, "tuner", | 574 | "tuner", |
575 | dev->tuner_addr, NULL); | 575 | dev->tuner_addr, NULL); |
576 | if (dev->sd_tuner == NULL) | 576 | if (dev->sd_tuner == NULL) |
577 | cx231xx_info("tuner subdev registration failure\n"); | 577 | cx231xx_info("tuner subdev registration failure\n"); |
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index db054004e462..8861309268b1 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -1247,7 +1247,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
1247 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: | 1247 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: |
1248 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 1248 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
1249 | &dev->i2c_bus[2].i2c_adap, | 1249 | &dev->i2c_bus[2].i2c_adap, |
1250 | NULL, "cx25840", 0x88 >> 1, NULL); | 1250 | "cx25840", 0x88 >> 1, NULL); |
1251 | if (dev->sd_cx25840) { | 1251 | if (dev->sd_cx25840) { |
1252 | dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE; | 1252 | dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE; |
1253 | v4l2_subdev_call(dev->sd_cx25840, core, load_fw); | 1253 | v4l2_subdev_call(dev->sd_cx25840, core, load_fw); |
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 3cc9f462d08d..8b2fb8a4375c 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -1507,10 +1507,10 @@ int cx23885_video_register(struct cx23885_dev *dev) | |||
1507 | if (dev->tuner_addr) | 1507 | if (dev->tuner_addr) |
1508 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 1508 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
1509 | &dev->i2c_bus[1].i2c_adap, | 1509 | &dev->i2c_bus[1].i2c_adap, |
1510 | NULL, "tuner", dev->tuner_addr, NULL); | 1510 | "tuner", dev->tuner_addr, NULL); |
1511 | else | 1511 | else |
1512 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 1512 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
1513 | &dev->i2c_bus[1].i2c_adap, NULL, | 1513 | &dev->i2c_bus[1].i2c_adap, |
1514 | "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_TV)); | 1514 | "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_TV)); |
1515 | if (sd) { | 1515 | if (sd) { |
1516 | struct tuner_setup tun_setup; | 1516 | struct tuner_setup tun_setup; |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index b26fcba8600c..9b9e169cce90 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -3515,19 +3515,18 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) | |||
3515 | later code configures a tea5767. | 3515 | later code configures a tea5767. |
3516 | */ | 3516 | */ |
3517 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, | 3517 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, |
3518 | NULL, "tuner", | 3518 | "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO)); |
3519 | 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO)); | ||
3520 | if (has_demod) | 3519 | if (has_demod) |
3521 | v4l2_i2c_new_subdev(&core->v4l2_dev, | 3520 | v4l2_i2c_new_subdev(&core->v4l2_dev, |
3522 | &core->i2c_adap, NULL, "tuner", | 3521 | &core->i2c_adap, "tuner", |
3523 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); | 3522 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); |
3524 | if (core->board.tuner_addr == ADDR_UNSET) { | 3523 | if (core->board.tuner_addr == ADDR_UNSET) { |
3525 | v4l2_i2c_new_subdev(&core->v4l2_dev, | 3524 | v4l2_i2c_new_subdev(&core->v4l2_dev, |
3526 | &core->i2c_adap, NULL, "tuner", | 3525 | &core->i2c_adap, "tuner", |
3527 | 0, has_demod ? tv_addrs + 4 : tv_addrs); | 3526 | 0, has_demod ? tv_addrs + 4 : tv_addrs); |
3528 | } else { | 3527 | } else { |
3529 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, | 3528 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, |
3530 | NULL, "tuner", core->board.tuner_addr, NULL); | 3529 | "tuner", core->board.tuner_addr, NULL); |
3531 | } | 3530 | } |
3532 | } | 3531 | } |
3533 | 3532 | ||
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index d2f159daa8b5..ab98c0e07f9f 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1896,14 +1896,13 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1896 | 1896 | ||
1897 | if (core->board.audio_chip == V4L2_IDENT_WM8775) | 1897 | if (core->board.audio_chip == V4L2_IDENT_WM8775) |
1898 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, | 1898 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, |
1899 | NULL, "wm8775", 0x36 >> 1, NULL); | 1899 | "wm8775", 0x36 >> 1, NULL); |
1900 | 1900 | ||
1901 | if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) { | 1901 | if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) { |
1902 | /* This probes for a tda9874 as is used on some | 1902 | /* This probes for a tda9874 as is used on some |
1903 | Pixelview Ultra boards. */ | 1903 | Pixelview Ultra boards. */ |
1904 | v4l2_i2c_new_subdev(&core->v4l2_dev, | 1904 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, |
1905 | &core->i2c_adap, | 1905 | "tvaudio", 0, I2C_ADDRS(0xb0 >> 1)); |
1906 | NULL, "tvaudio", 0, I2C_ADDRS(0xb0 >> 1)); | ||
1907 | } | 1906 | } |
1908 | 1907 | ||
1909 | switch (core->boardnr) { | 1908 | switch (core->boardnr) { |
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index d8e38cc4ec40..7333a9bb2549 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c | |||
@@ -1986,7 +1986,6 @@ static __init int vpfe_probe(struct platform_device *pdev) | |||
1986 | vpfe_dev->sd[i] = | 1986 | vpfe_dev->sd[i] = |
1987 | v4l2_i2c_new_subdev_board(&vpfe_dev->v4l2_dev, | 1987 | v4l2_i2c_new_subdev_board(&vpfe_dev->v4l2_dev, |
1988 | i2c_adap, | 1988 | i2c_adap, |
1989 | NULL, | ||
1990 | &sdinfo->board_info, | 1989 | &sdinfo->board_info, |
1991 | NULL); | 1990 | NULL); |
1992 | if (vpfe_dev->sd[i]) { | 1991 | if (vpfe_dev->sd[i]) { |
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index 6ac6acd16352..193abab6b355 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c | |||
@@ -2013,7 +2013,6 @@ static __init int vpif_probe(struct platform_device *pdev) | |||
2013 | vpif_obj.sd[i] = | 2013 | vpif_obj.sd[i] = |
2014 | v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev, | 2014 | v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev, |
2015 | i2c_adap, | 2015 | i2c_adap, |
2016 | NULL, | ||
2017 | &subdevdata->board_info, | 2016 | &subdevdata->board_info, |
2018 | NULL); | 2017 | NULL); |
2019 | 2018 | ||
diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index 685f6a6ee603..412c65d54fe1 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c | |||
@@ -1553,7 +1553,7 @@ static __init int vpif_probe(struct platform_device *pdev) | |||
1553 | 1553 | ||
1554 | for (i = 0; i < subdev_count; i++) { | 1554 | for (i = 0; i < subdev_count; i++) { |
1555 | vpif_obj.sd[i] = v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev, | 1555 | vpif_obj.sd[i] = v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev, |
1556 | i2c_adap, NULL, | 1556 | i2c_adap, |
1557 | &subdevdata[i].board_info, | 1557 | &subdevdata[i].board_info, |
1558 | NULL); | 1558 | NULL); |
1559 | if (!vpif_obj.sd[i]) { | 1559 | if (!vpif_obj.sd[i]) { |
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 54859233f311..f7e9168157a5 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -2554,39 +2554,39 @@ void em28xx_card_setup(struct em28xx *dev) | |||
2554 | /* request some modules */ | 2554 | /* request some modules */ |
2555 | if (dev->board.has_msp34xx) | 2555 | if (dev->board.has_msp34xx) |
2556 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 2556 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
2557 | NULL, "msp3400", 0, msp3400_addrs); | 2557 | "msp3400", 0, msp3400_addrs); |
2558 | 2558 | ||
2559 | if (dev->board.decoder == EM28XX_SAA711X) | 2559 | if (dev->board.decoder == EM28XX_SAA711X) |
2560 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 2560 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
2561 | NULL, "saa7115_auto", 0, saa711x_addrs); | 2561 | "saa7115_auto", 0, saa711x_addrs); |
2562 | 2562 | ||
2563 | if (dev->board.decoder == EM28XX_TVP5150) | 2563 | if (dev->board.decoder == EM28XX_TVP5150) |
2564 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 2564 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
2565 | NULL, "tvp5150", 0, tvp5150_addrs); | 2565 | "tvp5150", 0, tvp5150_addrs); |
2566 | 2566 | ||
2567 | if (dev->em28xx_sensor == EM28XX_MT9V011) { | 2567 | if (dev->em28xx_sensor == EM28XX_MT9V011) { |
2568 | struct v4l2_subdev *sd; | 2568 | struct v4l2_subdev *sd; |
2569 | 2569 | ||
2570 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 2570 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
2571 | &dev->i2c_adap, NULL, "mt9v011", 0, mt9v011_addrs); | 2571 | &dev->i2c_adap, "mt9v011", 0, mt9v011_addrs); |
2572 | v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal); | 2572 | v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal); |
2573 | } | 2573 | } |
2574 | 2574 | ||
2575 | 2575 | ||
2576 | if (dev->board.adecoder == EM28XX_TVAUDIO) | 2576 | if (dev->board.adecoder == EM28XX_TVAUDIO) |
2577 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 2577 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
2578 | NULL, "tvaudio", dev->board.tvaudio_addr, NULL); | 2578 | "tvaudio", dev->board.tvaudio_addr, NULL); |
2579 | 2579 | ||
2580 | if (dev->board.tuner_type != TUNER_ABSENT) { | 2580 | if (dev->board.tuner_type != TUNER_ABSENT) { |
2581 | int has_demod = (dev->tda9887_conf & TDA9887_PRESENT); | 2581 | int has_demod = (dev->tda9887_conf & TDA9887_PRESENT); |
2582 | 2582 | ||
2583 | if (dev->board.radio.type) | 2583 | if (dev->board.radio.type) |
2584 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 2584 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
2585 | NULL, "tuner", dev->board.radio_addr, NULL); | 2585 | "tuner", dev->board.radio_addr, NULL); |
2586 | 2586 | ||
2587 | if (has_demod) | 2587 | if (has_demod) |
2588 | v4l2_i2c_new_subdev(&dev->v4l2_dev, | 2588 | v4l2_i2c_new_subdev(&dev->v4l2_dev, |
2589 | &dev->i2c_adap, NULL, "tuner", | 2589 | &dev->i2c_adap, "tuner", |
2590 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); | 2590 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); |
2591 | if (dev->tuner_addr == 0) { | 2591 | if (dev->tuner_addr == 0) { |
2592 | enum v4l2_i2c_tuner_type type = | 2592 | enum v4l2_i2c_tuner_type type = |
@@ -2594,14 +2594,14 @@ void em28xx_card_setup(struct em28xx *dev) | |||
2594 | struct v4l2_subdev *sd; | 2594 | struct v4l2_subdev *sd; |
2595 | 2595 | ||
2596 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 2596 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
2597 | &dev->i2c_adap, NULL, "tuner", | 2597 | &dev->i2c_adap, "tuner", |
2598 | 0, v4l2_i2c_tuner_addrs(type)); | 2598 | 0, v4l2_i2c_tuner_addrs(type)); |
2599 | 2599 | ||
2600 | if (sd) | 2600 | if (sd) |
2601 | dev->tuner_addr = v4l2_i2c_subdev_addr(sd); | 2601 | dev->tuner_addr = v4l2_i2c_subdev_addr(sd); |
2602 | } else { | 2602 | } else { |
2603 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 2603 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
2604 | NULL, "tuner", dev->tuner_addr, NULL); | 2604 | "tuner", dev->tuner_addr, NULL); |
2605 | } | 2605 | } |
2606 | } | 2606 | } |
2607 | 2607 | ||
diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c index 9a075d83dd1f..b8faff2dd711 100644 --- a/drivers/media/video/fsl-viu.c +++ b/drivers/media/video/fsl-viu.c | |||
@@ -1486,7 +1486,7 @@ static int __devinit viu_of_probe(struct platform_device *op, | |||
1486 | 1486 | ||
1487 | ad = i2c_get_adapter(0); | 1487 | ad = i2c_get_adapter(0); |
1488 | viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad, | 1488 | viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad, |
1489 | NULL, "saa7113", VIU_VIDEO_DECODER_ADDR, NULL); | 1489 | "saa7113", VIU_VIDEO_DECODER_ADDR, NULL); |
1490 | 1490 | ||
1491 | viu_dev->vidq.timeout.function = viu_vid_timeout; | 1491 | viu_dev->vidq.timeout.function = viu_vid_timeout; |
1492 | viu_dev->vidq.timeout.data = (unsigned long)viu_dev; | 1492 | viu_dev->vidq.timeout.data = (unsigned long)viu_dev; |
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 9e8039ac909e..665191c9b407 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c | |||
@@ -239,19 +239,16 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx) | |||
239 | return -1; | 239 | return -1; |
240 | if (hw == IVTV_HW_TUNER) { | 240 | if (hw == IVTV_HW_TUNER) { |
241 | /* special tuner handling */ | 241 | /* special tuner handling */ |
242 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 242 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0, |
243 | adap, NULL, type, | 243 | itv->card_i2c->radio); |
244 | 0, itv->card_i2c->radio); | ||
245 | if (sd) | 244 | if (sd) |
246 | sd->grp_id = 1 << idx; | 245 | sd->grp_id = 1 << idx; |
247 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 246 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0, |
248 | adap, NULL, type, | 247 | itv->card_i2c->demod); |
249 | 0, itv->card_i2c->demod); | ||
250 | if (sd) | 248 | if (sd) |
251 | sd->grp_id = 1 << idx; | 249 | sd->grp_id = 1 << idx; |
252 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 250 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0, |
253 | adap, NULL, type, | 251 | itv->card_i2c->tv); |
254 | 0, itv->card_i2c->tv); | ||
255 | if (sd) | 252 | if (sd) |
256 | sd->grp_id = 1 << idx; | 253 | sd->grp_id = 1 << idx; |
257 | return sd ? 0 : -1; | 254 | return sd ? 0 : -1; |
@@ -267,17 +264,16 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx) | |||
267 | /* It's an I2C device other than an analog tuner or IR chip */ | 264 | /* It's an I2C device other than an analog tuner or IR chip */ |
268 | if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { | 265 | if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) { |
269 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 266 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, |
270 | adap, NULL, type, 0, I2C_ADDRS(hw_addrs[idx])); | 267 | adap, type, 0, I2C_ADDRS(hw_addrs[idx])); |
271 | } else if (hw == IVTV_HW_CX25840) { | 268 | } else if (hw == IVTV_HW_CX25840) { |
272 | struct cx25840_platform_data pdata; | 269 | struct cx25840_platform_data pdata; |
273 | 270 | ||
274 | pdata.pvr150_workaround = itv->pvr150_workaround; | 271 | pdata.pvr150_workaround = itv->pvr150_workaround; |
275 | sd = v4l2_i2c_new_subdev_cfg(&itv->v4l2_dev, | 272 | sd = v4l2_i2c_new_subdev_cfg(&itv->v4l2_dev, |
276 | adap, NULL, type, 0, &pdata, hw_addrs[idx], | 273 | adap, type, 0, &pdata, hw_addrs[idx], NULL); |
277 | NULL); | ||
278 | } else { | 274 | } else { |
279 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, | 275 | sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, |
280 | adap, NULL, type, hw_addrs[idx], NULL); | 276 | adap, type, hw_addrs[idx], NULL); |
281 | } | 277 | } |
282 | if (sd) | 278 | if (sd) |
283 | sd->grp_id = 1 << idx; | 279 | sd->grp_id = 1 << idx; |
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index 94ba698d0ad4..4e8fd965f151 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c | |||
@@ -185,17 +185,17 @@ static int mxb_probe(struct saa7146_dev *dev) | |||
185 | } | 185 | } |
186 | 186 | ||
187 | mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, | 187 | mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, |
188 | NULL, "saa7111", I2C_SAA7111A, NULL); | 188 | "saa7111", I2C_SAA7111A, NULL); |
189 | mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, | 189 | mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, |
190 | NULL, "tea6420", I2C_TEA6420_1, NULL); | 190 | "tea6420", I2C_TEA6420_1, NULL); |
191 | mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, | 191 | mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, |
192 | NULL, "tea6420", I2C_TEA6420_2, NULL); | 192 | "tea6420", I2C_TEA6420_2, NULL); |
193 | mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, | 193 | mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, |
194 | NULL, "tea6415c", I2C_TEA6415C, NULL); | 194 | "tea6415c", I2C_TEA6415C, NULL); |
195 | mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, | 195 | mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, |
196 | NULL, "tda9840", I2C_TDA9840, NULL); | 196 | "tda9840", I2C_TDA9840, NULL); |
197 | mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, | 197 | mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter, |
198 | NULL, "tuner", I2C_TUNER, NULL); | 198 | "tuner", I2C_TUNER, NULL); |
199 | 199 | ||
200 | /* check if all devices are present */ | 200 | /* check if all devices are present */ |
201 | if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c || | 201 | if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c || |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index bef202752cc8..66ad516bdfd9 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2088,16 +2088,14 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2088 | " Setting up with specified i2c address 0x%x", | 2088 | " Setting up with specified i2c address 0x%x", |
2089 | mid, i2caddr[0]); | 2089 | mid, i2caddr[0]); |
2090 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, | 2090 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, |
2091 | NULL, fname, | 2091 | fname, i2caddr[0], NULL); |
2092 | i2caddr[0], NULL); | ||
2093 | } else { | 2092 | } else { |
2094 | pvr2_trace(PVR2_TRACE_INIT, | 2093 | pvr2_trace(PVR2_TRACE_INIT, |
2095 | "Module ID %u:" | 2094 | "Module ID %u:" |
2096 | " Setting up with address probe list", | 2095 | " Setting up with address probe list", |
2097 | mid); | 2096 | mid); |
2098 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, | 2097 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, |
2099 | NULL, fname, | 2098 | fname, 0, i2caddr); |
2100 | 0, i2caddr); | ||
2101 | } | 2099 | } |
2102 | 2100 | ||
2103 | if (!sd) { | 2101 | if (!sd) { |
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 26f7ad292aed..1b93207c89e8 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -44,7 +44,7 @@ static struct v4l2_subdev *fimc_subdev_register(struct fimc_dev *fimc, | |||
44 | return ERR_PTR(-ENOMEM); | 44 | return ERR_PTR(-ENOMEM); |
45 | 45 | ||
46 | sd = v4l2_i2c_new_subdev_board(&vid_cap->v4l2_dev, i2c_adap, | 46 | sd = v4l2_i2c_new_subdev_board(&vid_cap->v4l2_dev, i2c_adap, |
47 | NULL, isp_info->board_info, NULL); | 47 | isp_info->board_info, NULL); |
48 | if (!sd) { | 48 | if (!sd) { |
49 | v4l2_err(&vid_cap->v4l2_dev, "failed to acquire subdev\n"); | 49 | v4l2_err(&vid_cap->v4l2_dev, "failed to acquire subdev\n"); |
50 | return NULL; | 50 | return NULL; |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 0911cb580e18..1d4d0a49ea52 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -7551,22 +7551,22 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
7551 | so we do not need to probe for a radio tuner device. */ | 7551 | so we do not need to probe for a radio tuner device. */ |
7552 | if (dev->radio_type != UNSET) | 7552 | if (dev->radio_type != UNSET) |
7553 | v4l2_i2c_new_subdev(&dev->v4l2_dev, | 7553 | v4l2_i2c_new_subdev(&dev->v4l2_dev, |
7554 | &dev->i2c_adap, NULL, "tuner", | 7554 | &dev->i2c_adap, "tuner", |
7555 | dev->radio_addr, NULL); | 7555 | dev->radio_addr, NULL); |
7556 | if (has_demod) | 7556 | if (has_demod) |
7557 | v4l2_i2c_new_subdev(&dev->v4l2_dev, | 7557 | v4l2_i2c_new_subdev(&dev->v4l2_dev, |
7558 | &dev->i2c_adap, NULL, "tuner", | 7558 | &dev->i2c_adap, "tuner", |
7559 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); | 7559 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); |
7560 | if (dev->tuner_addr == ADDR_UNSET) { | 7560 | if (dev->tuner_addr == ADDR_UNSET) { |
7561 | enum v4l2_i2c_tuner_type type = | 7561 | enum v4l2_i2c_tuner_type type = |
7562 | has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; | 7562 | has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; |
7563 | 7563 | ||
7564 | v4l2_i2c_new_subdev(&dev->v4l2_dev, | 7564 | v4l2_i2c_new_subdev(&dev->v4l2_dev, |
7565 | &dev->i2c_adap, NULL, "tuner", | 7565 | &dev->i2c_adap, "tuner", |
7566 | 0, v4l2_i2c_tuner_addrs(type)); | 7566 | 0, v4l2_i2c_tuner_addrs(type)); |
7567 | } else { | 7567 | } else { |
7568 | v4l2_i2c_new_subdev(&dev->v4l2_dev, | 7568 | v4l2_i2c_new_subdev(&dev->v4l2_dev, |
7569 | &dev->i2c_adap, NULL, "tuner", | 7569 | &dev->i2c_adap, "tuner", |
7570 | dev->tuner_addr, NULL); | 7570 | dev->tuner_addr, NULL); |
7571 | } | 7571 | } |
7572 | } | 7572 | } |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 764d7d219fed..756a27812260 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -991,7 +991,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
991 | if (card_is_empress(dev)) { | 991 | if (card_is_empress(dev)) { |
992 | struct v4l2_subdev *sd = | 992 | struct v4l2_subdev *sd = |
993 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 993 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
994 | NULL, "saa6752hs", | 994 | "saa6752hs", |
995 | saa7134_boards[dev->board].empress_addr, NULL); | 995 | saa7134_boards[dev->board].empress_addr, NULL); |
996 | 996 | ||
997 | if (sd) | 997 | if (sd) |
@@ -1002,7 +1002,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
1002 | struct v4l2_subdev *sd; | 1002 | struct v4l2_subdev *sd; |
1003 | 1003 | ||
1004 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 1004 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
1005 | &dev->i2c_adap, NULL, "saa6588", | 1005 | &dev->i2c_adap, "saa6588", |
1006 | 0, I2C_ADDRS(saa7134_boards[dev->board].rds_addr)); | 1006 | 0, I2C_ADDRS(saa7134_boards[dev->board].rds_addr)); |
1007 | if (sd) { | 1007 | if (sd) { |
1008 | printk(KERN_INFO "%s: found RDS decoder\n", dev->name); | 1008 | printk(KERN_INFO "%s: found RDS decoder\n", dev->name); |
diff --git a/drivers/media/video/sh_vou.c b/drivers/media/video/sh_vou.c index 0f4906136b8f..4e5a8cf76ded 100644 --- a/drivers/media/video/sh_vou.c +++ b/drivers/media/video/sh_vou.c | |||
@@ -1406,7 +1406,7 @@ static int __devinit sh_vou_probe(struct platform_device *pdev) | |||
1406 | goto ereset; | 1406 | goto ereset; |
1407 | 1407 | ||
1408 | subdev = v4l2_i2c_new_subdev_board(&vou_dev->v4l2_dev, i2c_adap, | 1408 | subdev = v4l2_i2c_new_subdev_board(&vou_dev->v4l2_dev, i2c_adap, |
1409 | NULL, vou_pdata->board_info, NULL); | 1409 | vou_pdata->board_info, NULL); |
1410 | if (!subdev) { | 1410 | if (!subdev) { |
1411 | ret = -ENOMEM; | 1411 | ret = -ENOMEM; |
1412 | goto ei2cnd; | 1412 | goto ei2cnd; |
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 43848a751d11..335120c2021b 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -896,7 +896,7 @@ static int soc_camera_init_i2c(struct soc_camera_device *icd, | |||
896 | icl->board_info->platform_data = icd; | 896 | icl->board_info->platform_data = icd; |
897 | 897 | ||
898 | subdev = v4l2_i2c_new_subdev_board(&ici->v4l2_dev, adap, | 898 | subdev = v4l2_i2c_new_subdev_board(&ici->v4l2_dev, adap, |
899 | NULL, icl->board_info, NULL); | 899 | icl->board_info, NULL); |
900 | if (!subdev) | 900 | if (!subdev) |
901 | goto ei2cnd; | 901 | goto ei2cnd; |
902 | 902 | ||
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c index e3bbae26e3ce..81dd53bb5267 100644 --- a/drivers/media/video/usbvision/usbvision-i2c.c +++ b/drivers/media/video/usbvision/usbvision-i2c.c | |||
@@ -251,7 +251,7 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision) | |||
251 | hit-and-miss. */ | 251 | hit-and-miss. */ |
252 | mdelay(10); | 252 | mdelay(10); |
253 | v4l2_i2c_new_subdev(&usbvision->v4l2_dev, | 253 | v4l2_i2c_new_subdev(&usbvision->v4l2_dev, |
254 | &usbvision->i2c_adap, NULL, | 254 | &usbvision->i2c_adap, |
255 | "saa7115_auto", 0, saa711x_addrs); | 255 | "saa7115_auto", 0, saa711x_addrs); |
256 | break; | 256 | break; |
257 | } | 257 | } |
@@ -261,14 +261,14 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision) | |||
261 | struct tuner_setup tun_setup; | 261 | struct tuner_setup tun_setup; |
262 | 262 | ||
263 | sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev, | 263 | sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev, |
264 | &usbvision->i2c_adap, NULL, | 264 | &usbvision->i2c_adap, |
265 | "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); | 265 | "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); |
266 | /* depending on whether we found a demod or not, select | 266 | /* depending on whether we found a demod or not, select |
267 | the tuner type. */ | 267 | the tuner type. */ |
268 | type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; | 268 | type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; |
269 | 269 | ||
270 | sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev, | 270 | sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev, |
271 | &usbvision->i2c_adap, NULL, | 271 | &usbvision->i2c_adap, |
272 | "tuner", 0, v4l2_i2c_tuner_addrs(type)); | 272 | "tuner", 0, v4l2_i2c_tuner_addrs(type)); |
273 | 273 | ||
274 | if (sd == NULL) | 274 | if (sd == NULL) |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 9294282b5add..b5eb1f3950b1 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -368,18 +368,15 @@ EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_init); | |||
368 | 368 | ||
369 | /* Load an i2c sub-device. */ | 369 | /* Load an i2c sub-device. */ |
370 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | 370 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, |
371 | struct i2c_adapter *adapter, const char *module_name, | 371 | struct i2c_adapter *adapter, struct i2c_board_info *info, |
372 | struct i2c_board_info *info, const unsigned short *probe_addrs) | 372 | const unsigned short *probe_addrs) |
373 | { | 373 | { |
374 | struct v4l2_subdev *sd = NULL; | 374 | struct v4l2_subdev *sd = NULL; |
375 | struct i2c_client *client; | 375 | struct i2c_client *client; |
376 | 376 | ||
377 | BUG_ON(!v4l2_dev); | 377 | BUG_ON(!v4l2_dev); |
378 | 378 | ||
379 | if (module_name) | 379 | request_module(I2C_MODULE_PREFIX "%s", info->type); |
380 | request_module(module_name); | ||
381 | else | ||
382 | request_module(I2C_MODULE_PREFIX "%s", info->type); | ||
383 | 380 | ||
384 | /* Create the i2c client */ | 381 | /* Create the i2c client */ |
385 | if (info->addr == 0 && probe_addrs) | 382 | if (info->addr == 0 && probe_addrs) |
@@ -432,8 +429,7 @@ error: | |||
432 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board); | 429 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board); |
433 | 430 | ||
434 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | 431 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, |
435 | struct i2c_adapter *adapter, | 432 | struct i2c_adapter *adapter, const char *client_type, |
436 | const char *module_name, const char *client_type, | ||
437 | int irq, void *platform_data, | 433 | int irq, void *platform_data, |
438 | u8 addr, const unsigned short *probe_addrs) | 434 | u8 addr, const unsigned short *probe_addrs) |
439 | { | 435 | { |
@@ -447,8 +443,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | |||
447 | info.irq = irq; | 443 | info.irq = irq; |
448 | info.platform_data = platform_data; | 444 | info.platform_data = platform_data; |
449 | 445 | ||
450 | return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, module_name, | 446 | return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, probe_addrs); |
451 | &info, probe_addrs); | ||
452 | } | 447 | } |
453 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg); | 448 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg); |
454 | 449 | ||
diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index 01bcdb44b5c6..9eda7cc03121 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c | |||
@@ -1360,7 +1360,7 @@ static __devinit int viacam_probe(struct platform_device *pdev) | |||
1360 | */ | 1360 | */ |
1361 | sensor_adapter = viafb_find_i2c_adapter(VIA_PORT_31); | 1361 | sensor_adapter = viafb_find_i2c_adapter(VIA_PORT_31); |
1362 | cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, sensor_adapter, | 1362 | cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, sensor_adapter, |
1363 | NULL, "ov7670", 0x42 >> 1, NULL); | 1363 | "ov7670", 0x42 >> 1, NULL); |
1364 | if (cam->sensor == NULL) { | 1364 | if (cam->sensor == NULL) { |
1365 | dev_err(&pdev->dev, "Unable to find the sensor!\n"); | 1365 | dev_err(&pdev->dev, "Unable to find the sensor!\n"); |
1366 | ret = -ENODEV; | 1366 | ret = -ENODEV; |
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index e5e005dc1554..7e7eec48f8b1 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -4334,10 +4334,10 @@ static int __init vino_module_init(void) | |||
4334 | 4334 | ||
4335 | vino_drvdata->decoder = | 4335 | vino_drvdata->decoder = |
4336 | v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter, | 4336 | v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter, |
4337 | NULL, "saa7191", 0, I2C_ADDRS(0x45)); | 4337 | "saa7191", 0, I2C_ADDRS(0x45)); |
4338 | vino_drvdata->camera = | 4338 | vino_drvdata->camera = |
4339 | v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter, | 4339 | v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter, |
4340 | NULL, "indycam", 0, I2C_ADDRS(0x2b)); | 4340 | "indycam", 0, I2C_ADDRS(0x2b)); |
4341 | 4341 | ||
4342 | dprintk("init complete!\n"); | 4342 | dprintk("init complete!\n"); |
4343 | 4343 | ||
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c index 7e6d62467eaa..e520abf9f4c3 100644 --- a/drivers/media/video/zoran/zoran_card.c +++ b/drivers/media/video/zoran/zoran_card.c | |||
@@ -1343,13 +1343,12 @@ static int __devinit zoran_probe(struct pci_dev *pdev, | |||
1343 | } | 1343 | } |
1344 | 1344 | ||
1345 | zr->decoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, | 1345 | zr->decoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, |
1346 | &zr->i2c_adapter, NULL, zr->card.i2c_decoder, | 1346 | &zr->i2c_adapter, zr->card.i2c_decoder, |
1347 | 0, zr->card.addrs_decoder); | 1347 | 0, zr->card.addrs_decoder); |
1348 | 1348 | ||
1349 | if (zr->card.i2c_encoder) | 1349 | if (zr->card.i2c_encoder) |
1350 | zr->encoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, | 1350 | zr->encoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, |
1351 | &zr->i2c_adapter, | 1351 | &zr->i2c_adapter, zr->card.i2c_encoder, |
1352 | NULL, zr->card.i2c_encoder, | ||
1353 | 0, zr->card.addrs_encoder); | 1352 | 0, zr->card.addrs_encoder); |
1354 | 1353 | ||
1355 | dprintk(2, | 1354 | dprintk(2, |
diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c index b3f42f37a313..48d4e483d8a4 100644 --- a/drivers/staging/go7007/go7007-driver.c +++ b/drivers/staging/go7007/go7007-driver.c | |||
@@ -199,7 +199,7 @@ static int init_i2c_module(struct i2c_adapter *adapter, const char *type, | |||
199 | struct go7007 *go = i2c_get_adapdata(adapter); | 199 | struct go7007 *go = i2c_get_adapdata(adapter); |
200 | struct v4l2_device *v4l2_dev = &go->v4l2_dev; | 200 | struct v4l2_device *v4l2_dev = &go->v4l2_dev; |
201 | 201 | ||
202 | if (v4l2_i2c_new_subdev(v4l2_dev, adapter, NULL, type, addr, NULL)) | 202 | if (v4l2_i2c_new_subdev(v4l2_dev, adapter, type, addr, NULL)) |
203 | return 0; | 203 | return 0; |
204 | 204 | ||
205 | printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", type); | 205 | printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", type); |
diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 664e6038090d..b143258f094a 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c | |||
@@ -545,7 +545,7 @@ static void tm6000_config_tuner(struct tm6000_core *dev) | |||
545 | 545 | ||
546 | /* Load tuner module */ | 546 | /* Load tuner module */ |
547 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 547 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
548 | NULL, "tuner", dev->tuner_addr, NULL); | 548 | "tuner", dev->tuner_addr, NULL); |
549 | 549 | ||
550 | memset(&tun_setup, 0, sizeof(tun_setup)); | 550 | memset(&tun_setup, 0, sizeof(tun_setup)); |
551 | tun_setup.type = dev->tuner_type; | 551 | tun_setup.type = dev->tuner_type; |
@@ -683,7 +683,7 @@ static int tm6000_init_dev(struct tm6000_core *dev) | |||
683 | 683 | ||
684 | if (dev->caps.has_tda9874) | 684 | if (dev->caps.has_tda9874) |
685 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, | 685 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
686 | NULL, "tvaudio", I2C_ADDR_TDA9874, NULL); | 686 | "tvaudio", I2C_ADDR_TDA9874, NULL); |
687 | 687 | ||
688 | /* register and initialize V4L2 */ | 688 | /* register and initialize V4L2 */ |
689 | rc = tm6000_v4l2_register(dev); | 689 | rc = tm6000_v4l2_register(dev); |
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 41dd480e45f1..239125af3ea3 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -137,31 +137,27 @@ struct v4l2_subdev_ops; | |||
137 | 137 | ||
138 | 138 | ||
139 | /* Load an i2c module and return an initialized v4l2_subdev struct. | 139 | /* Load an i2c module and return an initialized v4l2_subdev struct. |
140 | Only call request_module if module_name != NULL. | ||
141 | The client_type argument is the name of the chip that's on the adapter. */ | 140 | The client_type argument is the name of the chip that's on the adapter. */ |
142 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | 141 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, |
143 | struct i2c_adapter *adapter, | 142 | struct i2c_adapter *adapter, const char *client_type, |
144 | const char *module_name, const char *client_type, | ||
145 | int irq, void *platform_data, | 143 | int irq, void *platform_data, |
146 | u8 addr, const unsigned short *probe_addrs); | 144 | u8 addr, const unsigned short *probe_addrs); |
147 | 145 | ||
148 | /* Load an i2c module and return an initialized v4l2_subdev struct. | 146 | /* Load an i2c module and return an initialized v4l2_subdev struct. |
149 | Only call request_module if module_name != NULL. | ||
150 | The client_type argument is the name of the chip that's on the adapter. */ | 147 | The client_type argument is the name of the chip that's on the adapter. */ |
151 | static inline struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, | 148 | static inline struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, |
152 | struct i2c_adapter *adapter, | 149 | struct i2c_adapter *adapter, const char *client_type, |
153 | const char *module_name, const char *client_type, | ||
154 | u8 addr, const unsigned short *probe_addrs) | 150 | u8 addr, const unsigned short *probe_addrs) |
155 | { | 151 | { |
156 | return v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, module_name, | 152 | return v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, client_type, 0, NULL, |
157 | client_type, 0, NULL, addr, probe_addrs); | 153 | addr, probe_addrs); |
158 | } | 154 | } |
159 | 155 | ||
160 | struct i2c_board_info; | 156 | struct i2c_board_info; |
161 | 157 | ||
162 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | 158 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, |
163 | struct i2c_adapter *adapter, const char *module_name, | 159 | struct i2c_adapter *adapter, struct i2c_board_info *info, |
164 | struct i2c_board_info *info, const unsigned short *probe_addrs); | 160 | const unsigned short *probe_addrs); |
165 | 161 | ||
166 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ | 162 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ |
167 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, | 163 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, |