From 52115fc32905c0bacc244f1dace9a138518df0de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Fri, 14 Jun 2024 01:01:42 +0200 Subject: [PATCH] hwmon: (core) Make hwmon_class const MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- drivers/hwmon/hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.50.1