hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/w83977f_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * W83977F Watchdog Timer Driver for Winbond W83977F I/O Chip
34 *
....@@ -7,12 +8,6 @@
78 * and wdt977.c by Woody Suwalski
89 *
910 * -----------------------
10
- *
11
- * This program is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU General Public License
13
- * as published by the Free Software Foundation; either version
14
- * 2 of the License, or (at your option) any later version.
15
- *
1611 */
1712
1813 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -298,7 +293,7 @@
298293 __module_get(THIS_MODULE);
299294
300295 wdt_start();
301
- return nonseekable_open(inode, file);
296
+ return stream_open(inode, file);
302297 }
303298
304299 static int wdt_release(struct inode *inode, struct file *file)
....@@ -427,7 +422,7 @@
427422 return -EINVAL;
428423
429424 wdt_keepalive();
430
- /* Fall through */
425
+ fallthrough;
431426
432427 case WDIOC_GETTIMEOUT:
433428 return put_user(timeout, uarg.i);
....@@ -451,6 +446,7 @@
451446 .llseek = no_llseek,
452447 .write = wdt_write,
453448 .unlocked_ioctl = wdt_ioctl,
449
+ .compat_ioctl = compat_ptr_ioctl,
454450 .open = wdt_open,
455451 .release = wdt_release,
456452 };