summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-06-14 02:01:42 +0300
committerGuenter Roeck <linux@roeck-us.net>2024-06-14 02:44:34 +0300
commit52115fc32905c0bacc244f1dace9a138518df0de (patch)
treef0d8a09da69f34fad8c5ee8d45dcc35386d85eef
parentdc5abc2ff0ee4279a6c0351674cd24745216c4db (diff)
downloadlinux-52115fc32905c0bacc244f1dace9a138518df0de.tar.xz
hwmon: (core) Make hwmon_class const
Now that the driver core allows for struct class to be in read-only memory, mark hwmon_class as const. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20240614-class-const-hwmon-v1-1-27b910d06a90@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/hwmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 8aee253b5829..a362080d41fa 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -137,7 +137,7 @@ static void hwmon_dev_release(struct device *dev)
kfree(hwdev);
}
-static struct class hwmon_class = {
+static const struct class hwmon_class = {
.name = "hwmon",
.dev_groups = hwmon_dev_attr_groups,
.dev_release = hwmon_dev_release,