hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/w83877f_wdt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * W83877F Computer Watchdog Timer driver
34 *
45 * Based on acquirewdt.c by Alan Cox,
56 * and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net>
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
....@@ -224,7 +220,7 @@
224220
225221 /* Good, fire up the show */
226222 wdt_startup();
227
- return nonseekable_open(inode, file);
223
+ return stream_open(inode, file);
228224 }
229225
230226 static int fop_close(struct inode *inode, struct file *file)
....@@ -292,8 +288,8 @@
292288
293289 timeout = new_timeout;
294290 wdt_keepalive();
295
- /* Fall through */
296291 }
292
+ fallthrough;
297293 case WDIOC_GETTIMEOUT:
298294 return put_user(timeout, p);
299295 default:
....@@ -308,6 +304,7 @@
308304 .open = fop_open,
309305 .release = fop_close,
310306 .unlocked_ioctl = fop_ioctl,
307
+ .compat_ioctl = compat_ptr_ioctl,
311308 };
312309
313310 static struct miscdevice wdt_miscdev = {