gpiolib: Use short form of ternary operator in gpiod_get_index()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 1 Feb 2022 15:27:57 +0000 (17:27 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 8 Feb 2022 09:35:59 +0000 (10:35 +0100)
commit322b86e7a73042300303844c9bc51bf6995a47ef
tree8617213c624390837c14382bdc751d3e185910b6
parent80c78fbeef10121a0fbba3fd2ed333f5de118f6d
gpiolib: Use short form of ternary operator in gpiod_get_index()

Instead of repeating first argument for true branch, use short
form of the ternary operator, i.e. ?:.

While at it, fix a typo in the comment.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpiolib.c