aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-04 13:29:42 -0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-02-05 09:42:21 +0100
commita875746f603b86134bd1924b7289fc3542fd45e7 (patch)
tree0b00ba0f8394e6d699d93c8c7cb0b8a2e7262a9d /drivers/gpio
parentfc449cefe69d19d3a56903ca7e0fbc91c48ca3f5 (diff)
downloadlinux-a875746f603b86134bd1924b7289fc3542fd45e7.tar.gz
gpio: gpiolib: make gpio_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the gpio_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index d50a786f81760..24d046268a013 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -63,7 +63,7 @@ static int gpio_bus_match(struct device *dev, struct device_driver *drv)
return 1;
}
-static struct bus_type gpio_bus_type = {
+static const struct bus_type gpio_bus_type = {
.name = "gpio",
.match = gpio_bus_match,
};