drivers/linuxgpiod: simplify gpio release
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 13 Jun 2022 13:56:14 +0000 (15:56 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 24 Jun 2022 21:50:19 +0000 (21:50 +0000)
commiteab88eadd7b828f9c07007a8ac91988c37b5d036
tree1caf8b186a3d2f86bedfb4626aed36b78db80207
parent1a3573d73194a334d2737554538b51eff649e1a8
drivers/linuxgpiod: simplify gpio release

We already have a helper to release the gpio.
Extend it to also release its corresponding gpio chip.

As side effect, remove comparison with NULL.

Change-Id: I47cd446edfaead662d63c3330f25a791b747e882
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7033
Tested-by: jenkins
Reviewed-by: Steve Marple <stevemarple@googlemail.com>
src/jtag/drivers/linuxgpiod.c