Skip to content

Commit bd86030

Browse files
KunWuChangregkh
authored andcommitted
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@kylinos.cn> Link: https://lore.kernel.org/r/20240423023810.1889264-1-chentao@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4231694 commit bd86030

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/misc/tifm_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static struct attribute *tifm_dev_attrs[] = {
148148
};
149149
ATTRIBUTE_GROUPS(tifm_dev);
150150

151-
static struct bus_type tifm_bus_type = {
151+
static const struct bus_type tifm_bus_type = {
152152
.name = "tifm",
153153
.dev_groups = tifm_dev_groups,
154154
.match = tifm_bus_match,

0 commit comments

Comments
 (0)