On Tue, Jul 23, 2019 at 9:27 PM Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > Use use device_property_count_uXX() directly, that makes code neater. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> (...) > /* 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"); Patch applied (makes the kernel a better place) but: Can't we just use: gpiod_count(pctrl->dev, NULL); ? It's more to the point when counting gpios I think. However this driver is not includeing <linux/gpio/consumer.h> and is this "gpios" property really a consumer property? I think so but... Yours, Linus Walleij