gpio: Use callback presence to determine need of valid_mask

After we switched the two drivers that have .need_valid_mask
set to use the callback for setting up the .valid_mask,
we can just use the presence of the .init_valid_mask()
callback (or the OF reserved ranges, nota bene) to determine
whether to allocate the mask or not and we can drop the
.need_valid_mask field altogether.

Cc: Benjamin Gaignard <benjamin.gaignard@st.com>
Cc: Amelie Delaunay <amelie.delaunay@st.com>
Cc: Stephen Boyd <swboyd@chromium.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20190819093058.10863-1-linus.walleij@linaro.org
This commit is contained in:
Linus Walleij 2019-08-19 11:30:58 +02:00
parent da9b142ab2
commit eb1e8bd6e3
4 changed files with 3 additions and 15 deletions

View file

@ -403,15 +403,6 @@ struct gpio_chip {
struct gpio_irq_chip irq;
#endif /* CONFIG_GPIOLIB_IRQCHIP */
/**
* @need_valid_mask:
*
* If set core allocates @valid_mask with all its values initialized
* with init_valid_mask() or set to one if init_valid_mask() is not
* defined
*/
bool need_valid_mask;
/**
* @valid_mask:
*