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 <linux@weissschuh.net> Link: https://lore.kernel.org/r/20230211-kobj_type-sound-v1-1-17107ceb25b7@weissschuh.net Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 4fe20d6 commit aacdac3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)