From: Jonathan Cameron <jic23@kernel.org>
To: Tang Bin <tangbin@cmss.chinamobile.com>
Cc: 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,
linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Subject: Re: [PATCH] iio: adc: fsl-imx25-gcq: Use the defined variable to clean code
Date: Sat, 24 Jul 2021 16:27:41 +0100 [thread overview]
Message-ID: <20210724162741.15a8b8b6@jic23-huawei> (raw)
In-Reply-To: <20210720125945.11548-1-tangbin@cmss.chinamobile.com>
On Tue, 20 Jul 2021 20:59:45 +0800
Tang Bin <tangbin@cmss.chinamobile.com> wrote:
> 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>
Applied.
Thanks,
Jonathan
> ---
> 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;
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-07-24 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 12:59 [PATCH] iio: adc: fsl-imx25-gcq: Use the defined variable to clean code Tang Bin
2021-07-24 15:27 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210724162741.15a8b8b6@jic23-huawei \
--to=jic23@kernel.org \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=tangbin@cmss.chinamobile.com \
--cc=zhangshengju@cmss.chinamobile.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox