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 |
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
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 --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;
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(-)