hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/mv64x60_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * mv64x60_wdt.c - MV64X60 (Marvell Discovery) watchdog userspace interface
34 *
....@@ -9,10 +10,7 @@
910 *
1011 * Derived from mpc8xx_wdt.c, with the following copyright.
1112 *
12
- * 2002 (c) Florian Schirmer <jolt@tuxbox.org> This file is licensed under
13
- * the terms of the GNU General Public License version 2. This program
14
- * is licensed "as is" without any warranty of any kind, whether express
15
- * or implied.
13
+ * 2002 (c) Florian Schirmer <jolt@tuxbox.org>
1614 */
1715
1816 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -133,7 +131,7 @@
133131
134132 mv64x60_wdt_handler_enable();
135133
136
- return nonseekable_open(inode, file);
134
+ return stream_open(inode, file);
137135 }
138136
139137 static int mv64x60_wdt_release(struct inode *inode, struct file *file)
....@@ -224,7 +222,7 @@
224222 if (get_user(timeout, (int __user *)argp))
225223 return -EFAULT;
226224 mv64x60_wdt_set_timeout(timeout);
227
- /* Fall through */
225
+ fallthrough;
228226
229227 case WDIOC_GETTIMEOUT:
230228 if (put_user(mv64x60_wdt_timeout, (int __user *)argp))
....@@ -243,6 +241,7 @@
243241 .llseek = no_llseek,
244242 .write = mv64x60_wdt_write,
245243 .unlocked_ioctl = mv64x60_wdt_ioctl,
244
+ .compat_ioctl = compat_ptr_ioctl,
246245 .open = mv64x60_wdt_open,
247246 .release = mv64x60_wdt_release,
248247 };