All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dio: make dio_bus_type const
@ 2024-02-11 15:40 Ricardo B. Marliere
  2024-02-12 10:44 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo B. Marliere @ 2024-02-11 15:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the dio_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>
---
 drivers/dio/dio-driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c
index 69c46935ffc7..2d9fa6011945 100644
--- a/drivers/dio/dio-driver.c
+++ b/drivers/dio/dio-driver.c
@@ -123,7 +123,7 @@ static int dio_bus_match(struct device *dev, struct device_driver *drv)
 }
 
 
-struct bus_type dio_bus_type = {
+const struct bus_type dio_bus_type = {
 	.name	= "dio",
 	.match	= dio_bus_match,
 	.probe	= dio_device_probe,

---
base-commit: 047371968ffc470769f541d6933e262dc7085456
change-id: 20240211-bus_cleanup-dio-6cafa80e759b

Best regards,
-- 
Ricardo B. Marliere <ricardo@marliere.net>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-12 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-11 15:40 [PATCH] dio: make dio_bus_type const Ricardo B. Marliere
2024-02-12 10:44 ` Greg Kroah-Hartman
2024-02-12 11:32   ` Ricardo B. Marliere

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.