Skip to content

Commit aa97783

Browse files
t-8chjoergroedel
authored andcommitted
iommu: 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/20230214-kobj_type-iommu-v1-1-e7392834b9d0@weissschuh.net Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent e8d018d commit aa97783

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ static void iommu_group_release(struct kobject *kobj)
739739
kfree(group);
740740
}
741741

742-
static struct kobj_type iommu_group_ktype = {
742+
static const struct kobj_type iommu_group_ktype = {
743743
.sysfs_ops = &iommu_group_sysfs_ops,
744744
.release = iommu_group_release,
745745
};

0 commit comments

Comments
 (0)