Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Weißschuh and committed by
Guenter Roeck
52115fc3 dc5abc2f

+1 -1
+1 -1
drivers/hwmon/hwmon.c
··· 137 137 kfree(hwdev); 138 138 } 139 139 140 - static struct class hwmon_class = { 140 + static const struct class hwmon_class = { 141 141 .name = "hwmon", 142 142 .dev_groups = hwmon_dev_attr_groups, 143 143 .dev_release = hwmon_dev_release,