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

watchdog: Make watchdog_class const

Now that the driver core allows for struct class to be in read-only
memory, mark watchdog_class as const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240614-class-const-wdt-v1-1-f9a4e2b1ba76@weissschuh.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Thomas Weißschuh and committed by
Wim Van Sebroeck
d794a741 22a40d14

+1 -1
+1 -1
drivers/watchdog/watchdog_dev.c
··· 1004 1004 .fops = &watchdog_fops, 1005 1005 }; 1006 1006 1007 - static struct class watchdog_class = { 1007 + static const struct class watchdog_class = { 1008 1008 .name = "watchdog", 1009 1009 .dev_groups = wdt_groups, 1010 1010 };