]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwmon: (core) Make hwmon_class const
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 13 Jun 2024 23:01:42 +0000 (01:01 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 13 Jun 2024 23:44:34 +0000 (16:44 -0700)
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>
drivers/hwmon/hwmon.c

index 8aee253b5829e9ddd6dbdce24e2744a078ef6a1d..a362080d41fa825dca23f484ce642bd442d0c1be 100644 (file)
@@ -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,