linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] pinctrl: msm: Switch to use device_property_count_uXX()
@ 2019-07-23 19:27 Andy Shevchenko
  2019-07-23 19:27 ` [PATCH v1 2/2] pinctrl: qdf2xxx: " Andy Shevchenko
  2019-08-05 10:01 ` [PATCH v1 1/2] pinctrl: msm: " Linus Walleij
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2019-07-23 19:27 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, linux-arm-msm, Linus Walleij, linux-gpio
  Cc: Andy Shevchenko

Use use device_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/qcom/pinctrl-msm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 7f35c196bb3e..90bc667139e0 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -617,8 +617,7 @@ static int msm_gpio_init_valid_mask(struct gpio_chip *chip)
 	}
 
 	/* The number of GPIOs in the ACPI tables */
-	len = ret = device_property_read_u16_array(pctrl->dev, "gpios", NULL,
-						   0);
+	len = ret = device_property_count_u16(pctrl->dev, "gpios");
 	if (ret < 0)
 		return 0;
 
@@ -996,7 +995,7 @@ static bool msm_gpio_needs_valid_mask(struct msm_pinctrl *pctrl)
 	if (pctrl->soc->reserved_gpios)
 		return true;
 
-	return device_property_read_u16_array(pctrl->dev, "gpios", NULL, 0) > 0;
+	return device_property_count_u16(pctrl->dev, "gpios") > 0;
 }
 
 static int msm_gpio_init(struct msm_pinctrl *pctrl)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-05 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 19:27 [PATCH v1 1/2] pinctrl: msm: Switch to use device_property_count_uXX() Andy Shevchenko
2019-07-23 19:27 ` [PATCH v1 2/2] pinctrl: qdf2xxx: " Andy Shevchenko
2019-08-05 10:02   ` Linus Walleij
2019-08-05 10:24     ` Andy Shevchenko
2019-08-05 10:01 ` [PATCH v1 1/2] pinctrl: msm: " Linus Walleij
2019-08-05 10:24   ` Andy Shevchenko

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).