watchdog: tqmx86: Constify static struct watchdog_ops

The struct tqmx86_wdt_ops is only assigned to the ops pointer in the
watchdog_device struct, which is a pointer to const struct watchdog_ops.
Make it const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210727223042.48150-3-rikard.falkeborn@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
Rikard Falkeborn 2021-07-28 00:30:41 +02:00 коммит произвёл Wim Van Sebroeck
Родитель 47b45c4a69
Коммит 625e407ce0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -62,7 +62,7 @@ static const struct watchdog_info tqmx86_wdt_info = {
.identity = "TQMx86 Watchdog", .identity = "TQMx86 Watchdog",
}; };
static struct watchdog_ops tqmx86_wdt_ops = { static const struct watchdog_ops tqmx86_wdt_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.start = tqmx86_wdt_start, .start = tqmx86_wdt_start,
.set_timeout = tqmx86_wdt_set_timeout, .set_timeout = tqmx86_wdt_set_timeout,