hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/smsc37b787_wdt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * SMsC 37B787 Watchdog Timer driver for Linux 2.6.x.x
34 *
45 * Based on acquirewdt.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
56 * and some other existing drivers
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; either version
10
- * 2 of the License, or (at your option) any later version.
117 *
128 * The authors do NOT admit liability nor provide warranty for
139 * any of this software. This material is provided "AS-IS" in
....@@ -40,7 +36,7 @@
4036 * mknod /dev/watchdog c 10 130
4137 *
4238 * For an example userspace keep-alive daemon, see:
43
- * Documentation/watchdog/wdt.txt
39
+ * Documentation/watchdog/wdt.rst
4440 */
4541
4642 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -366,7 +362,7 @@
366362 pr_info("Watchdog enabled. Timeout set to %d %s\n",
367363 timeout, (unit == UNIT_SECOND) ? "second(s)" : "minute(s)");
368364
369
- return nonseekable_open(inode, file);
365
+ return stream_open(inode, file);
370366 }
371367
372368 /* close => shut off the timer */
....@@ -478,7 +474,7 @@
478474 return -EINVAL;
479475 timeout = new_timeout;
480476 wb_smsc_wdt_set_timeout(timeout);
481
- /* fall through and return the new timeout... */
477
+ fallthrough; /* and return the new timeout */
482478 case WDIOC_GETTIMEOUT:
483479 new_timeout = timeout;
484480 if (unit == UNIT_MINUTE)
....@@ -509,6 +505,7 @@
509505 .llseek = no_llseek,
510506 .write = wb_smsc_wdt_write,
511507 .unlocked_ioctl = wb_smsc_wdt_ioctl,
508
+ .compat_ioctl = compat_ptr_ioctl,
512509 .open = wb_smsc_wdt_open,
513510 .release = wb_smsc_wdt_release,
514511 };