From patchwork Tue Jul 20 12:59:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Bin X-Patchwork-Id: 12388253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3132C07E95 for ; Tue, 20 Jul 2021 13:08:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 92A1F6101E for ; Tue, 20 Jul 2021 13:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230427AbhGTM2N (ORCPT ); Tue, 20 Jul 2021 08:28:13 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:59136 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232921AbhGTM2M (ORCPT ); Tue, 20 Jul 2021 08:28:12 -0400 X-Greylist: delayed 563 seconds by postgrey-1.27 at vger.kernel.org; Tue, 20 Jul 2021 08:28:11 EDT Received: from spf.mail.chinamobile.com (unknown[172.16.121.17]) by rmmx-syy-dmz-app03-12003 (RichMail) with SMTP id 2ee360f6c88da67-3df30; Tue, 20 Jul 2021 20:58:56 +0800 (CST) X-RM-TRANSID: 2ee360f6c88da67-3df30 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.0.144.134]) by rmsmtp-syy-appsvr09-12009 (RichMail) with SMTP id 2ee960f6c88d6d7-9b48d; Tue, 20 Jul 2021 20:58:56 +0800 (CST) X-RM-TRANSID: 2ee960f6c88d6d7-9b48d From: Tang Bin To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, broonie@kernel.org, lgirdwood@gmail.com Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tang Bin , Zhang Shengju Subject: [PATCH] iio: adc: fsl-imx25-gcq: Use the defined variable to clean code Date: Tue, 20 Jul 2021 20:59:45 +0800 Message-Id: <20210720125945.11548-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Use the defined variable "dev" to make the code cleaner. Co-developed-by: Zhang Shengju Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin --- drivers/iio/adc/fsl-imx25-gcq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c index d28976f21..01fe5b137 100644 --- a/drivers/iio/adc/fsl-imx25-gcq.c +++ b/drivers/iio/adc/fsl-imx25-gcq.c @@ -192,11 +192,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; @@ -298,7 +298,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;