gpiolib: Extract mask allocation into subroutine
authorStephen Boyd <swboyd@chromium.org>
Fri, 23 Mar 2018 16:34:50 +0000 (09:34 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 27 Mar 2018 13:34:07 +0000 (15:34 +0200)
commite4371f6e079294369ecb4cfa03aaeb60831e8b91
tree8ee1a67f3f0f91859b1b9a5335ec5464fc71e59e
parentb9c725ed73b7cecc7c9bc4b752ab3eb975ef9330
gpiolib: Extract mask allocation into subroutine

We're going to use similar code to allocate and set all the bits in a
mask for valid gpios to use. Extract the code from the irqchip version
so it can be reused.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c