]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: sim: fix the chip_name configfs item
authorBartosz Golaszewski <brgl@bgdev.pl>
Tue, 12 Jul 2022 07:40:55 +0000 (09:40 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 12 Jul 2022 11:41:25 +0000 (13:41 +0200)
commitfc57338d4bf3f964556714102b4276e9e0caf519
treec7ae8f4bc3b6504d8123808c85f4af0286b97797
parent487996e48b34d93836beb702e9dea5f991d1cd8a
gpio: sim: fix the chip_name configfs item

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: c43e3f54c3df ("gpio: sim: new testing module")
Cc: stable@vger.kernel.org
Reported-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Kent Gibson <warthog618@gmail.com>
Tested-by: Kent Gibson <warthog618@gmail.com>
drivers/gpio/gpio-sim.c