Re: [PATCH v2 04/11] gpio: Ensure struct gpio_chip for gpiochip_setup_dev()

From: Bartosz Golaszewski

Date: Wed Feb 04 2026 - 05:36:08 EST


On Tue, 3 Feb 2026 07:10:51 +0100, Tzung-Bi Shih <tzungbi@xxxxxxxxxx> said:
> Ensure struct gpio_chip for gpiochip_setup_dev(). This eliminates a few
> checks for struct gpio_chip.
>
> Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>

Same comment as patch 3. I don't like seeing both gpio_chip and gpio_device
being passed to the same function. If you already dereferenced gpio_chip, pass
it on its own and get the address of the associated devices from its member
pointer.

Bartosz