From c9fc5aff217267a9ef3a76450760534488870c69 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Mon, 19 Aug 2019 10:49:04 +0200 Subject: gpio: Pass mask and size with the init_valid_mask() It is more helpful for drivers to have the affected fields directly available when we use the callback to set up the valid mask. Change this and switch over the only user (MSM) to use the passed parameters. If we do this we can also move the mask out of publicly visible struct fields. Cc: Stephen Boyd Cc: Bjorn Andersson Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190819084904.30027-1-linus.walleij@linaro.or Reviewed-by: Stephen Boyd Signed-off-by: Linus Walleij --- include/linux/gpio/driver.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/linux/gpio') diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 72d48a2bab65..dc03323897ef 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -363,7 +363,9 @@ struct gpio_chip { void (*dbg_show)(struct seq_file *s, struct gpio_chip *chip); - int (*init_valid_mask)(struct gpio_chip *chip); + int (*init_valid_mask)(struct gpio_chip *chip, + unsigned long *valid_mask, + unsigned int ngpios); int base; u16 ngpio; -- cgit v1.2.3