iio: adc: fsl-imx25-gcq: Use the defined variable to clean code
authorTang Bin <tangbin@cmss.chinamobile.com>
Tue, 20 Jul 2021 12:59:45 +0000 (20:59 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 24 Jul 2021 15:27:21 +0000 (16:27 +0100)
Use the defined variable "dev" to make the code cleaner.

Co-developed-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210720125945.11548-1-tangbin@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/fsl-imx25-gcq.c

index ab5139e..0c771d6 100644 (file)
@@ -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;