Re: [PATCH 2/5] gpio: of: drop needless gpio_chip look-up in of_parse_own_gpio()

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

 



On Tue, Jun 14, 2016 at 12:07 PM, Masahiro Yamada
<yamada.masahiro@xxxxxxxxxxxxx> wrote:

> This function is doing more complicated than needed.  The caller of
> this function, of_gpiochip_scan_gpios() already knows the pointer to
> the gpio_chip.  It can pass it to of_parse_own_gpio() instead of
> looking up the gpio_chip by gpiochip_find().
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>

Patch applied!

First I was worried about this semantic change:

> -       chip_np = np->parent;
> +       chip_np = chip->of_node;

But then I read up on the code and saw that of_gpiochip_add() sets
it to the parent if not set before.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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