gpiolib: Extract gpiod_not_found() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 21 Oct 2020 14:25:28 +0000 (17:25 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 26 Oct 2020 14:23:33 +0000 (15:23 +0100)
commit7b58696d9a8415576317615c63e9899797026f17
treee941387d6206474b9086abfff4b0456d0300ef7c
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
gpiolib: Extract gpiod_not_found() helper

Several places in the code are using same idiom, i.e.
IS_ERR(desc) && PTR_ERR(desc) == -ENOENT
which meaning is GPIO description is not found.

For better readability extract gpiod_not_found() helper and use it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib-devres.c
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h