Re: [PATCH v1 1/2] pinctrl: msm: Switch to use device_property_count_uXX()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux