Skip to content

Commit 881a103

Browse files
t-8chjwrdegoede
authored andcommitted
platform/x86: think-lmi: 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]> Reviewed-by: Mark Pearson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 438688d commit 881a103

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/think-lmi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,12 +1089,12 @@ static void tlmi_pwd_setting_release(struct kobject *kobj)
10891089
kfree(setting);
10901090
}
10911091

1092-
static struct kobj_type tlmi_attr_setting_ktype = {
1092+
static const struct kobj_type tlmi_attr_setting_ktype = {
10931093
.release = &tlmi_attr_setting_release,
10941094
.sysfs_ops = &tlmi_kobj_sysfs_ops,
10951095
};
10961096

1097-
static struct kobj_type tlmi_pwd_setting_ktype = {
1097+
static const struct kobj_type tlmi_pwd_setting_ktype = {
10981098
.release = &tlmi_pwd_setting_release,
10991099
.sysfs_ops = &tlmi_kobj_sysfs_ops,
11001100
};

0 commit comments

Comments
 (0)