From: Thomas Weißschuh Date: Mon, 27 Feb 2023 03:09:36 +0000 (+0000) Subject: efi: x86: make kobj_type structure constant X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=42a8af0fa4333701e0e318d3877f45bd6d51ce49;p=linux.git efi: x86: make kobj_type structure constant Since commit ee6d3dd4ed48 ("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 Signed-off-by: Ard Biesheuvel --- diff --git a/arch/x86/platform/efi/runtime-map.c b/arch/x86/platform/efi/runtime-map.c index bbee682ef8cd1..a6f02cef3ca2b 100644 --- a/arch/x86/platform/efi/runtime-map.c +++ b/arch/x86/platform/efi/runtime-map.c @@ -93,7 +93,7 @@ static void map_release(struct kobject *kobj) kfree(entry); } -static struct kobj_type __refdata map_ktype = { +static const struct kobj_type __refconst map_ktype = { .sysfs_ops = &map_attr_ops, .default_groups = def_groups, .release = map_release,