Commit 78a6af33 authored by Tang Bin's avatar Tang Bin Committed by Jonathan Cameron
Browse files

iio: adc: fsl-imx25-gcq: Use the defined variable to clean code

parent 7ff98c8a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -201,11 +201,11 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
	 */
	priv->vref[MX25_ADC_REFP_INT] = NULL;
	priv->vref[MX25_ADC_REFP_EXT] =
		devm_regulator_get_optional(&pdev->dev, "vref-ext");
		devm_regulator_get_optional(dev, "vref-ext");
	priv->vref[MX25_ADC_REFP_XP] =
		devm_regulator_get_optional(&pdev->dev, "vref-xp");
		devm_regulator_get_optional(dev, "vref-xp");
	priv->vref[MX25_ADC_REFP_YP] =
		devm_regulator_get_optional(&pdev->dev, "vref-yp");
		devm_regulator_get_optional(dev, "vref-yp");

	for_each_child_of_node(np, child) {
		u32 reg;
@@ -307,7 +307,7 @@ static int mx25_gcq_probe(struct platform_device *pdev)
	int ret;
	int i;

	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*priv));
	indio_dev = devm_iio_device_alloc(dev, sizeof(*priv));
	if (!indio_dev)
		return -ENOMEM;