]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
sh: dma-sysfs: Make dma_subsys const
authorRicardo B. Marliere <ricardo@marliere.net>
Sun, 4 Feb 2024 15:15:09 +0000 (12:15 -0300)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 15 Feb 2024 17:10:49 +0000 (18:10 +0100)
Now that the driver core can properly handle constant struct bus_type,
move the dma_subsys 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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-sh-v1-1-44ced951bb16@marliere.net
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
arch/sh/drivers/dma/dma-sysfs.c

index 431bc18f0a4119bdd11c2fd3c6c3e83a517bc6c1..9f666280d80cc19169cf6331a95d0be8d33cc514 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/string.h>
 #include <asm/dma.h>
 
-static struct bus_type dma_subsys = {
+static const struct bus_type dma_subsys = {
        .name = "dma",
        .dev_name = "dma",
 };