From: Bartosz Golaszewski Date: Fri, 18 Oct 2024 12:17:25 +0000 (+0200) Subject: iommu/sysfs: constify the class struct X-Git-Tag: v6.13-rc1~105^2~1^7~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2f528e91458b3c3360f21a34381b91883ff28e1;p=thirdparty%2Fkernel%2Fstable.git iommu/sysfs: constify the class struct 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 Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20241018121725.61128-1-brgl@bgdev.pl Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c index cbe378c34ba3e..170022c095361 100644 --- a/drivers/iommu/iommu-sysfs.c +++ b/drivers/iommu/iommu-sysfs.c @@ -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,