gpio: gpiolib: make gpio_bus_type const
authorRicardo B. Marliere <ricardo@marliere.net>
Sun, 4 Feb 2024 16:29:42 +0000 (13:29 -0300)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 5 Feb 2024 08:42:21 +0000 (09:42 +0100)
commita875746f603b86134bd1924b7289fc3542fd45e7
tree0b00ba0f8394e6d699d93c8c7cb0b8a2e7262a9d
parentfc449cefe69d19d3a56903ca7e0fbc91c48ca3f5
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>
drivers/gpio/gpiolib.c