Skip to content

Commit 0153431

Browse files
t-8chardbiesheuvel
authored andcommitted
efi: 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 42a8af0 commit 0153431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/efi/esrt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static void esre_release(struct kobject *kobj)
156156
kfree(entry);
157157
}
158158

159-
static struct kobj_type esre1_ktype = {
159+
static const struct kobj_type esre1_ktype = {
160160
.release = esre_release,
161161
.sysfs_ops = &esre_attr_ops,
162162
.default_groups = esre1_groups,

0 commit comments

Comments
 (0)