Skip to content

Commit aacdac3

Browse files
t-8chtiwai
authored andcommitted
ALSA: hda: 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] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 4fe20d6 commit aacdac3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/hda/hdac_sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static void widget_release(struct kobject *kobj)
148148
kfree(kobj);
149149
}
150150

151-
static struct kobj_type widget_ktype = {
151+
static const struct kobj_type widget_ktype = {
152152
.release = widget_release,
153153
.sysfs_ops = &widget_sysfs_ops,
154154
};

0 commit comments

Comments
 (0)