summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/fsl-imx25-gcq.c
diff options
context:
space:
mode:
authorTang Bin <tangbin@cmss.chinamobile.com>2021-07-20 15:59:45 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-07-24 18:27:21 +0300
commit78a6af334662879780718b18d91dc5f2576f5e5d (patch)
tree1817630a6e0e330f587995ac72e227770bdbc644 /drivers/iio/adc/fsl-imx25-gcq.c
parent7ff98c8afa46ea0ca207bcc89185ea28e6e83829 (diff)
downloadlinux-78a6af334662879780718b18d91dc5f2576f5e5d.tar.xz
iio: adc: fsl-imx25-gcq: Use the defined variable to clean code
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>
Diffstat (limited to 'drivers/iio/adc/fsl-imx25-gcq.c')
-rw-r--r--drivers/iio/adc/fsl-imx25-gcq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
index ab5139e911c3..0c771d60541a 100644
--- a/drivers/iio/adc/fsl-imx25-gcq.c
+++ b/drivers/iio/adc/fsl-imx25-gcq.c
@@ -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;