[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241018121725.61128-1-brgl@bgdev.pl>
Date: Fri, 18 Oct 2024 14:17:25 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>
Cc: iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: [PATCH] iommu/sysfs: constify the class struct
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
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@...aro.org>
---
drivers/iommu/iommu-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c
index cbe378c34ba3..170022c09536 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,
--
2.43.0
Powered by blists - more mailing lists