Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1532a070 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: Remove hardcoded module names passed to v4l2_i2c_new_subdev*



With the v4l2_i2c_new_subdev* functions now supporting loading modules
based on modaliases, replace the hardcoded module name passed to those
functions by NULL.

All corresponding I2C modules have been checked, and all of them include
a module aliases table with names corresponding to what the drivers
modified here use.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e9f0495a
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -212,7 +212,7 @@ void au0828_card_setup(struct au0828_dev *dev)
		   be abstracted out if we ever need to support a different
		   be abstracted out if we ever need to support a different
		   demod) */
		   demod) */
		sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
		sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
				"au8522", "au8522", 0x8e >> 1, NULL);
				NULL, "au8522", 0x8e >> 1, NULL);
		if (sd == NULL)
		if (sd == NULL)
			printk(KERN_ERR "analog subdev registration failed\n");
			printk(KERN_ERR "analog subdev registration failed\n");
	}
	}
@@ -221,7 +221,7 @@ void au0828_card_setup(struct au0828_dev *dev)
	if (dev->board.tuner_type != TUNER_ABSENT) {
	if (dev->board.tuner_type != TUNER_ABSENT) {
		/* Load the tuner module, which does the attach */
		/* Load the tuner module, which does the attach */
		sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
		sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
				"tuner", "tuner", dev->board.tuner_addr, NULL);
				NULL, "tuner", dev->board.tuner_addr, NULL);
		if (sd == NULL)
		if (sd == NULL)
			printk(KERN_ERR "tuner subdev registration fail\n");
			printk(KERN_ERR "tuner subdev registration fail\n");


+11 −11
Original line number Original line Diff line number Diff line
@@ -3529,7 +3529,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
		struct v4l2_subdev *sd;
		struct v4l2_subdev *sd;


		sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
			&btv->c.i2c_adap, "saa6588", "saa6588", 0, addrs);
			&btv->c.i2c_adap, NULL, "saa6588", 0, addrs);
		btv->has_saa6588 = (sd != NULL);
		btv->has_saa6588 = (sd != NULL);
	}
	}


@@ -3554,7 +3554,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
		};
		};


		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
			&btv->c.i2c_adap, "msp3400", "msp3400", 0, addrs);
			&btv->c.i2c_adap, NULL, "msp3400", 0, addrs);
		if (btv->sd_msp34xx)
		if (btv->sd_msp34xx)
			return;
			return;
		goto no_audio;
		goto no_audio;
@@ -3568,7 +3568,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
		};
		};


		if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tda7432", "tda7432", 0, addrs))
				&btv->c.i2c_adap, NULL, "tda7432", 0, addrs))
			return;
			return;
		goto no_audio;
		goto no_audio;
	}
	}
@@ -3576,7 +3576,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
	case 3: {
	case 3: {
		/* The user specified that we should probe for tvaudio */
		/* The user specified that we should probe for tvaudio */
		btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
			&btv->c.i2c_adap, "tvaudio", "tvaudio", 0, tvaudio_addrs());
			&btv->c.i2c_adap, NULL, "tvaudio", 0, tvaudio_addrs());
		if (btv->sd_tvaudio)
		if (btv->sd_tvaudio)
			return;
			return;
		goto no_audio;
		goto no_audio;
@@ -3596,11 +3596,11 @@ void __devinit bttv_init_card2(struct bttv *btv)
	   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) {
		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
			&btv->c.i2c_adap, "msp3400", "msp3400",
			&btv->c.i2c_adap, NULL, "msp3400",
			0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
			0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
	} else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
	} else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
			&btv->c.i2c_adap, "msp3400", "msp3400",
			&btv->c.i2c_adap, NULL, "msp3400",
			0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
			0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
	}
	}


@@ -3616,13 +3616,13 @@ void __devinit bttv_init_card2(struct bttv *btv)
		};
		};


		if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tda7432", "tda7432", 0, addrs))
				&btv->c.i2c_adap, NULL, "tda7432", 0, addrs))
			return;
			return;
	}
	}


	/* Now see if we can find one of the tvaudio devices. */
	/* Now see if we can find one of the tvaudio devices. */
	btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
	btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		&btv->c.i2c_adap, "tvaudio", "tvaudio", 0, tvaudio_addrs());
		&btv->c.i2c_adap, NULL, "tvaudio", 0, tvaudio_addrs());
	if (btv->sd_tvaudio)
	if (btv->sd_tvaudio)
		return;
		return;


@@ -3646,13 +3646,13 @@ void __devinit bttv_init_tuner(struct bttv *btv)
		/* Load tuner module before issuing tuner config call! */
		/* Load tuner module before issuing tuner config call! */
		if (bttv_tvcards[btv->c.type].has_radio)
		if (bttv_tvcards[btv->c.type].has_radio)
			v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
			v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				&btv->c.i2c_adap, NULL, "tuner",
				0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
				0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
		v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				&btv->c.i2c_adap, NULL, "tuner",
				0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
				0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
		v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
		v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				&btv->c.i2c_adap, NULL, "tuner",
				0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
				0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));


		tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
		tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
+1 −1
Original line number Original line Diff line number Diff line
@@ -2038,7 +2038,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,


	cam->sensor_addr = 0x42;
	cam->sensor_addr = 0x42;
	cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, &cam->i2c_adapter,
	cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, &cam->i2c_adapter,
			"ov7670", "ov7670", cam->sensor_addr, NULL);
			NULL, "ov7670", cam->sensor_addr, NULL);
	if (cam->sensor == NULL) {
	if (cam->sensor == NULL) {
		ret = -ENODEV;
		ret = -ENODEV;
		goto out_smbus;
		goto out_smbus;
+2 −2
Original line number Original line Diff line number Diff line
@@ -560,7 +560,7 @@ void cx231xx_card_setup(struct cx231xx *dev)
	if (dev->board.decoder == CX231XX_AVDECODER) {
	if (dev->board.decoder == CX231XX_AVDECODER) {
		dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
		dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
					&dev->i2c_bus[0].i2c_adap,
					&dev->i2c_bus[0].i2c_adap,
					"cx25840", "cx25840", 0x88 >> 1, NULL);
					NULL, "cx25840", 0x88 >> 1, NULL);
		if (dev->sd_cx25840 == NULL)
		if (dev->sd_cx25840 == NULL)
			cx231xx_info("cx25840 subdev registration failure\n");
			cx231xx_info("cx25840 subdev registration failure\n");
		cx25840_call(dev, core, load_fw);
		cx25840_call(dev, core, load_fw);
@@ -571,7 +571,7 @@ void cx231xx_card_setup(struct cx231xx *dev)
	if (dev->board.tuner_type != TUNER_ABSENT) {
	if (dev->board.tuner_type != TUNER_ABSENT) {
		dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
		dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
						    &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap,
						    &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap,
						    "tuner", "tuner",
						    NULL, "tuner",
						    dev->tuner_addr, NULL);
						    dev->tuner_addr, NULL);
		if (dev->sd_tuner == NULL)
		if (dev->sd_tuner == NULL)
			cx231xx_info("tuner subdev registration failure\n");
			cx231xx_info("tuner subdev registration failure\n");
+1 −1
Original line number Original line Diff line number Diff line
@@ -1247,7 +1247,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
	case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200:
	case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200:
		dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
		dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
				&dev->i2c_bus[2].i2c_adap,
				&dev->i2c_bus[2].i2c_adap,
				"cx25840", "cx25840", 0x88 >> 1, NULL);
				NULL, "cx25840", 0x88 >> 1, NULL);
		if (dev->sd_cx25840) {
		if (dev->sd_cx25840) {
			dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE;
			dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE;
			v4l2_subdev_call(dev->sd_cx25840, core, load_fw);
			v4l2_subdev_call(dev->sd_cx25840, core, load_fw);
Loading