Skip to content

Commit 438688d

Browse files
t-8chjwrdegoede
authored andcommitted
platform/x86: dell-wmi-sysman: 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]> 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 9a90ea7 commit 438688d

File tree

1 file changed

+1
-1
lines changed
  • drivers/platform/x86/dell/dell-wmi-sysman

1 file changed

+1
-1
lines changed

drivers/platform/x86/dell/dell-wmi-sysman/sysman.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static void attr_name_release(struct kobject *kobj)
255255
kfree(kobj);
256256
}
257257

258-
static struct kobj_type attr_name_ktype = {
258+
static const struct kobj_type attr_name_ktype = {
259259
.release = attr_name_release,
260260
.sysfs_ops = &wmi_sysman_kobj_sysfs_ops,
261261
};

0 commit comments

Comments
 (0)