iommu/sysfs: constify the class struct
PATCH 1/1 iommu/sysfs: constify the class struct
From: Bartosz Golaszewski <[email protected]>
All functions that take the class address as argument expect a const pointer so we can make the iommu class constant.
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/iommu/iommu-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/iommu-sysfs.c +1 -1
@@ -34,7 +34,7 @@ static void release_device(struct device *dev)kfree (dev); } -static struct class iommu_class = { +static const struct class iommu_class = { .name ="iommu" , .dev_release = release_device, .dev_groups = dev_groups,
Signature · 1 line
2.43.0
Quoted 9 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
All functions that take the class address as argument expect a const pointer so we can make the iommu class constant.
Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/iommu/iommu-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Jason Gunthorpe <[email protected]>
Jason
Quoted 2 lines · Bartosz Golaszewski
drivers/iommu/iommu-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.