pinctrl: qdf2xxx: Switch to use device_property_count_uXX()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Jul 2019 19:27:38 +0000 (22:27 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 5 Aug 2019 10:01:45 +0000 (12:01 +0200)
Use use device_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20190723192738.68486-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-qdf2xxx.c

index 5da5dd5..43bd15f 100644 (file)
@@ -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;