From eb1e8bd6e3900e3a3b9776cd1b09ecfc05573619 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Mon, 19 Aug 2019 11:30:58 +0200 Subject: 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 Cc: Amelie Delaunay Cc: Stephen Boyd Cc: Bjorn Andersson Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190819093058.10863-1-linus.walleij@linaro.org --- drivers/pinctrl/pinctrl-stmfx.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/pinctrl/pinctrl-stmfx.c') diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c index 13b6d6f72bcc..dd5aa9a2dfe5 100644 --- a/drivers/pinctrl/pinctrl-stmfx.c +++ b/drivers/pinctrl/pinctrl-stmfx.c @@ -662,7 +662,6 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev) pctl->gpio_chip.ngpio = pctl->pctl_desc.npins; pctl->gpio_chip.can_sleep = true; pctl->gpio_chip.of_node = np; - pctl->gpio_chip.need_valid_mask = true; pctl->gpio_chip.init_valid_mask = stmfx_pinctrl_gpio_init_valid_mask; ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl); -- cgit v1.2.3