[PATCH v1 3/8] gpiolib: Warn on drivers still using static gpiobase allocation
Christophe Leroy
christophe.leroy at csgroup.eu
Mon Aug 29 09:15:05 PDT 2022
In the preparation of getting completely rid of static gpiobase
allocation in the future, emit a warning in drivers still doing so.
Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
---
drivers/gpio/gpiolib.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index cc9c0a12259e..3a6f29eeb72d 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -715,6 +715,9 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
* a poison instead.
*/
gc->base = base;
+ } else {
+ dev_warn(&gdev->dev, "Static allocation of GPIO base is "
+ "deprecated, use dynamic allocation.");
}
gdev->base = base;
--
2.37.1
More information about the linux-arm-kernel
mailing list