Skip to content

Commit fb073aa

Browse files
t-8chdanvet
authored andcommitted
dma-buf: 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> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20230217-kobj_type-dma-buf-v1-1-b84a3616522c@weissschuh.net
1 parent ddddeda commit fb073aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/dma-buf/dma-buf-sysfs-stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void dma_buf_sysfs_release(struct kobject *kobj)
112112
kfree(sysfs_entry);
113113
}
114114

115-
static struct kobj_type dma_buf_ktype = {
115+
static const struct kobj_type dma_buf_ktype = {
116116
.sysfs_ops = &dma_buf_stats_sysfs_ops,
117117
.release = dma_buf_sysfs_release,
118118
.default_groups = dma_buf_stats_default_groups,

0 commit comments

Comments
 (0)