diff mbox series

[v1,2/2] pinctrl: qdf2xxx: Switch to use device_property_count_uXX()

Message ID 20190723192738.68486-2-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/2] pinctrl: msm: Switch to use device_property_count_uXX() | expand

Commit Message

Andy Shevchenko July 23, 2019, 7:27 p.m. UTC
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-qdf2xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij Aug. 5, 2019, 10:02 a.m. UTC | #1
On Tue, Jul 23, 2019 at 9:27 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> Use use device_property_count_uXX() directly, that makes code neater.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Patch applied. (Same comment.)

Yours,
Linus Walleij
Andy Shevchenko Aug. 5, 2019, 10:24 a.m. UTC | #2
On Mon, Aug 05, 2019 at 12:02:10PM +0200, Linus Walleij wrote:
> On Tue, Jul 23, 2019 at 9:27 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> 
> > Use use device_property_count_uXX() directly, that makes code neater.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Patch applied. (Same comment.)

Thanks, same comment.
diff mbox series

Patch

diff --git a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
index 5da5dd51542c..43bd15f16377 100644
--- a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
+++ b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
@@ -52,7 +52,7 @@  static int qdf2xxx_pinctrl_probe(struct platform_device *pdev)
 	}
 
 	/* The number of GPIOs in the approved list */
-	ret = device_property_read_u8_array(&pdev->dev, "gpios", NULL, 0);
+	ret = device_property_count_u8(&pdev->dev, "gpios");
 	if (ret < 0) {
 		dev_err(&pdev->dev, "missing 'gpios' property\n");
 		return ret;