[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240204-bus_cleanup-sh-v1-1-44ced951bb16@marliere.net>
Date: Sun, 04 Feb 2024 12:15:09 -0300
From: "Ricardo B. Marliere" <ricardo@...liere.net>
To: Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
Cc: linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Ricardo B. Marliere" <ricardo@...liere.net>
Subject: [PATCH] dma: dma-sysfs: make dma_subsys const
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@...uxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@...liere.net>
---
arch/sh/drivers/dma/dma-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c
index 431bc18f0a41..9f666280d80c 100644
--- a/arch/sh/drivers/dma/dma-sysfs.c
+++ b/arch/sh/drivers/dma/dma-sysfs.c
@@ -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",
};
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240204-bus_cleanup-sh-6d3c136da6bb
Best regards,
--
Ricardo B. Marliere <ricardo@...liere.net>
Powered by blists - more mailing lists