From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Gao Pan <b54642@freescale.com>
Cc: wsa@the-dreams.de, linux-i2c@vger.kernel.org,
B20596@freescale.com, b38611@freescale.com
Subject: Re: [Patch V1] i2c: imx: improve code readability
Date: Mon, 2 Nov 2015 10:29:50 +0100 [thread overview]
Message-ID: <20151102092950.GQ4931@pengutronix.de> (raw)
In-Reply-To: <1446455130-4704-1-git-send-email-b54642@freescale.com>
Hello,
On Mon, Nov 02, 2015 at 05:05:30PM +0800, Gao Pan wrote:
> Replace of_get_named_gpio_flags with of_get_named_gpio because
> the latter has less parameters, which improves code readability.
>
> Signed-off-by: Fugang Duan <B38611@freescale.com>
> Signed-off-by: Gao Pan <b54642@freescale.com>
> ---
> drivers/i2c/busses/i2c-imx.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 1e4d99d..b0fe090 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -996,10 +996,8 @@ static void i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
> PINCTRL_STATE_DEFAULT);
> i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl,
> "gpio");
> - rinfo->sda_gpio = of_get_named_gpio_flags(pdev->dev.of_node,
> - "sda-gpios", 0, NULL);
> - rinfo->scl_gpio = of_get_named_gpio_flags(pdev->dev.of_node,
> - "scl-gpios", 0, NULL);
> + rinfo->sda_gpio = of_get_named_gpio(pdev->dev.of_node, "sda-gpios", 0);
> + rinfo->scl_gpio = of_get_named_gpio(pdev->dev.of_node, "scl-gpios", 0);
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2015-11-02 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 9:05 [Patch V1] i2c: imx: improve code readability Gao Pan
2015-11-02 9:29 ` Uwe Kleine-König [this message]
2016-01-03 18:17 ` Wolfram Sang
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=20151102092950.GQ4931@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=B20596@freescale.com \
--cc=b38611@freescale.com \
--cc=b54642@freescale.com \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).