Skip to content

Commit 42a8af0

Browse files
t-8chardbiesheuvel
authored andcommitted
efi: x86: make kobj_type structure constant
Since commit ee6d3dd ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent ac9a786 commit 42a8af0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/platform/efi/runtime-map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static void map_release(struct kobject *kobj)
9393
kfree(entry);
9494
}
9595

96-
static struct kobj_type __refdata map_ktype = {
96+
static const struct kobj_type __refconst map_ktype = {
9797
.sysfs_ops = &map_attr_ops,
9898
.default_groups = def_groups,
9999
.release = map_release,

0 commit comments

Comments
 (0)