public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mei: bus: constify the struct mei_cl_bus_type usage
@ 2024-04-23  2:41 Kunwu Chan
  2024-04-23 19:45 ` Winkler, Tomas
  0 siblings, 1 reply; 4+ messages in thread
From: Kunwu Chan @ 2024-04-23  2:41 UTC (permalink / raw)
  To: tomas.winkler, arnd, gregkh, kunwu.chan; +Cc: linux-kernel, Kunwu Chan

Now that the driver core can properly handle constant struct bus_type,
move the mei_cl_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
 drivers/misc/mei/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index f9bcff197615..99393f610cdf 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -1327,7 +1327,7 @@ static int mei_cl_device_uevent(const struct device *dev, struct kobj_uevent_env
 	return 0;
 }
 
-static struct bus_type mei_cl_bus_type = {
+static const struct bus_type mei_cl_bus_type = {
 	.name		= "mei",
 	.dev_groups	= mei_cldev_groups,
 	.match		= mei_cl_device_match,
-- 
2.40.1


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

end of thread, other threads:[~2024-04-23 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23  2:41 [PATCH] mei: bus: constify the struct mei_cl_bus_type usage Kunwu Chan
2024-04-23 19:45 ` Winkler, Tomas
2024-04-23 19:57   ` gregkh
2024-04-23 20:05     ` Winkler, Tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox