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)
commit9ef6293c0659de3fa7981e795e70786c89610374
tree568d9d7de760697b5378428c8b2f4c5f77a2db10
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
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