]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: Unify expectations about ->request() returned value
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 21 Oct 2020 11:25:36 +0000 (14:25 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 26 Oct 2020 14:43:15 +0000 (15:43 +0100)
commit20ba727db58408fe6407cac7369dea211ec81262
treee0a0d6126a7cc0ec0b3d21fcbf8be09cf4bd5aff
parent978e0ce917e60057838e1d650ac5aa99b9d71222
gpiolib: Unify expectations about ->request() returned value

Half of the code in the GPIO library is written in an expectation that
any non-zero value returned from the ->request() callback is an error code,
while some code checks only for negative values.

Unify expectations about ->request() returned value to be non-zero
for an error and 0 for the success.

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