Re: [PATCH v2] gpio: sim: fix the chip_name configfs item

From: Kent Gibson
Date: Tue Jul 12 2022 - 04:09:47 EST


On Tue, Jul 12, 2022 at 09:40:55AM +0200, Bartosz Golaszewski wrote:
> The chip_name configs attribute always displays the device name of the
> first GPIO bank because the logic of the relevant function is simply
> wrong.
>
> Fix it by correctly comparing the bank's swnode against the GPIO
> device's children.
>
> Fixes: cb8c474e79be ("gpio: sim: new testing module")
> Cc: stable@xxxxxxxxxxxxxxx
> Reported-by: Kent Gibson <warthog618@xxxxxxxxx>
> Signed-off-by: Bartosz Golaszewski <brgl@xxxxxxxx>
> ---
> v1 -> v2:
> - use device_match_fwnode for shorter code
>

Works for me.

Reviewed-and-tested-by: Kent Gibson <warthog618@xxxxxxxxx>

Cheers,
Kent.