]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/sysfs: constify the class struct
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 18 Oct 2024 12:17:25 +0000 (14:17 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 29 Oct 2024 08:50:24 +0000 (09:50 +0100)
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20241018121725.61128-1-brgl@bgdev.pl
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu-sysfs.c

index cbe378c34ba3ebe1bd9e8ab22acdb7d5c976159e..170022c0953616d2b59b7648ddd8c836577a70ae 100644 (file)
@@ -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,