]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: Use proper type for bias enumerator in gpio_set_bias()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 9 Oct 2020 18:43:59 +0000 (21:43 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 28 Oct 2020 14:47:00 +0000 (15:47 +0100)
commit2d522a4fd6b9147513a09307e9b834cbbf6d1d54
tree568d9d7de760697b5378428c8b2f4c5f77a2db10
parenta1fe7c755400af92f0070a66f48f00b659aeacac
gpiolib: Use proper type for bias enumerator in gpio_set_bias()

First of all, bias has a special type as being a part of enum pin_config_param.
Second, 0 is also defined bias which is equivalent to BUS_HOLD.

Taking into account above, change type of bias variable and refactor
gpio_set_bias() in a way that it doesn't use BUS_HOLD as a place holder.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20201009184359.16427-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c