Re: [PATCH] gpio: xgs-iproc: fix parsing of ngpios property

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

 



On Sun, Oct 31, 2021 at 2:25 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Thu, Oct 14, 2021 at 3:48 PM Jonas Gorski <jonas.gorski@xxxxxxxxx> wrote:
> >
> > of_property_read_u32 returns 0 on success, not true, so we need to
> > invert the check to actually take over the provided ngpio value.
>
> > -       if (of_property_read_u32(dn, "ngpios", &num_gpios))
> > +       if (!of_property_read_u32(dn, "ngpios", &num_gpios))
> >                 chip->gc.ngpio = num_gpios;
>
> Just a side note: I'm wondering how many of such we have in the
> drivers and why we can't simply do it under the OF GPIO library's hood
> for everybody.
>
> --
> With Best Regards,
> Andy Shevchenko

Looks like we have 17, so yes, definitely a candidate for pulling into
the GPIO core.

Bart



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux