Skip to content

Commit 4ecc96c

Browse files
t-8chjgross1
authored andcommitted
xen: sysfs: 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]> Reviewed-by: Juergen Gross <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent 20e7da1 commit 4ecc96c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/sys-hypervisor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ static const struct sysfs_ops hyp_sysfs_ops = {
655655
.store = hyp_sysfs_store,
656656
};
657657

658-
static struct kobj_type hyp_sysfs_kobj_type = {
658+
static const struct kobj_type hyp_sysfs_kobj_type = {
659659
.sysfs_ops = &hyp_sysfs_ops,
660660
};
661661

0 commit comments

Comments
 (0)