[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240204-bus_cleanup-siox-v1-1-2d12583d3a6c@marliere.net>
Date: Sun, 04 Feb 2024 17:36:03 -0300
From: "Ricardo B. Marliere" <ricardo@...liere.net>
To: Thorsten Scherer <t.scherer@...elmann.de>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Ricardo B. Marliere" <ricardo@...liere.net>
Subject: [PATCH] siox: make siox_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the siox_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@...uxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@...liere.net>
---
drivers/siox/siox-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/siox/siox-core.c b/drivers/siox/siox-core.c
index 561408583b2b..a1eda7bd76ed 100644
--- a/drivers/siox/siox-core.c
+++ b/drivers/siox/siox-core.c
@@ -543,7 +543,7 @@ static void siox_shutdown(struct device *dev)
sdriver->shutdown(sdevice);
}
-static struct bus_type siox_bus_type = {
+static const struct bus_type siox_bus_type = {
.name = "siox",
.match = siox_match,
.probe = siox_probe,
---
base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7
change-id: 20240204-bus_cleanup-siox-ccf8775bf069
Best regards,
--
Ricardo B. Marliere <ricardo@...liere.net>
Powered by blists - more mailing lists