OSDN Git Service

gpio: Use callback presence to determine need of valid_mask
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 19 Aug 2019 09:30:58 +0000 (11:30 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 20 Aug 2019 08:42:07 +0000 (10:42 +0200)
commiteb1e8bd6e3900e3a3b9776cd1b09ecfc05573619
treeae5a6cb3d886b6996863b19b9ada95fc0358e273
parentda9b142ab2c55ae8c46242a7624fdf62c4089e7f
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
drivers/gpio/gpiolib.c
drivers/pinctrl/pinctrl-stmfx.c
drivers/pinctrl/qcom/pinctrl-msm.c
include/linux/gpio/driver.h