[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240423023810.1889264-1-chentao@kylinos.cn>
Date: Tue, 23 Apr 2024 10:38:10 +0800
From: Kunwu Chan <chentao@...inos.cn>
To: oakad@...oo.com,
arnd@...db.de,
gregkh@...uxfoundation.org,
kunwu.chan@...mail.com
Cc: linux-kernel@...r.kernel.org,
Kunwu Chan <chentao@...inos.cn>
Subject: [PATCH] tifm: constify the struct tifm_bus_type usage
Now that the driver core can properly handle constant struct bus_type,
move the tifm_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@...inos.cn>
---
drivers/misc/tifm_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c
index d2eb31f39aa7..fd9c3cbbc51e 100644
--- a/drivers/misc/tifm_core.c
+++ b/drivers/misc/tifm_core.c
@@ -148,7 +148,7 @@ static struct attribute *tifm_dev_attrs[] = {
};
ATTRIBUTE_GROUPS(tifm_dev);
-static struct bus_type tifm_bus_type = {
+static const struct bus_type tifm_bus_type = {
.name = "tifm",
.dev_groups = tifm_dev_groups,
.match = tifm_bus_match,
--
2.40.1
Powered by blists - more mailing lists