From: Christophe Leroy Date: Fri, 2 Sep 2022 12:42:04 +0000 (+0200) Subject: gpiolib: Warn on drivers still using static gpiobase allocation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=502df79b860563d79143be7a1453c2b3224cd836;p=linux.git gpiolib: Warn on drivers still using static gpiobase allocation 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 Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 4756ea08894f6..5c64d1a412c7a 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.\n"); } gdev->base = base;