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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ddddeda commit fb073aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)