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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4231694 commit bd86030

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)