From: Thomas Weißschuh Date: Thu, 13 Jun 2024 23:01:42 +0000 (+0200) Subject: hwmon: (core) Make hwmon_class const X-Git-Tag: v6.11-rc1~212^2~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52115fc32905c0bacc244f1dace9a138518df0de;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://lore.kernel.org/r/20240614-class-const-hwmon-v1-1-27b910d06a90@weissschuh.net Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 8aee253b5829e..a362080d41fa8 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,