From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH] i2c: gpio: use of_get_named_gpio() instead of of_get_named_gpio_flags()
Date: Wed, 20 Nov 2019 08:52:50 +0300 [thread overview]
Message-ID: <20191120055250.21711-1-antonynpavlov@gmail.com> (raw)
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/i2c/busses/i2c-gpio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 5ab43fe935..7ccdb0b222 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -94,8 +94,8 @@ static int of_i2c_gpio_probe(struct device_node *np,
if (!IS_ENABLED(CONFIG_OFDEVICE))
return -ENODEV;
- pdata->sda_pin = of_get_named_gpio_flags(np, "sda-gpios", 0, NULL);
- pdata->scl_pin = of_get_named_gpio_flags(np, "scl-gpios", 0, NULL);
+ pdata->sda_pin = of_get_named_gpio(np, "sda-gpios", 0);
+ pdata->scl_pin = of_get_named_gpio(np, "scl-gpios", 0);
if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->scl_pin))
&& (of_gpio_count(np) >= 2)) {
--
2.23.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2019-11-20 5:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 5:52 Antony Pavlov [this message]
2019-11-25 7:50 ` Sascha Hauer
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=20191120055250.21711-1-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/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