hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/sc520_wdt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * AMD Elan SC520 processor 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
....@@ -258,7 +254,7 @@
258254
259255 /* Good, fire up the show */
260256 wdt_startup();
261
- return nonseekable_open(inode, file);
257
+ return stream_open(inode, file);
262258 }
263259
264260 static int fop_close(struct inode *inode, struct file *file)
....@@ -324,8 +320,8 @@
324320 return -EINVAL;
325321
326322 wdt_keepalive();
327
- /* Fall through */
328323 }
324
+ fallthrough;
329325 case WDIOC_GETTIMEOUT:
330326 return put_user(timeout, p);
331327 default:
....@@ -340,6 +336,7 @@
340336 .open = fop_open,
341337 .release = fop_close,
342338 .unlocked_ioctl = fop_ioctl,
339
+ .compat_ioctl = compat_ptr_ioctl,
343340 };
344341
345342 static struct miscdevice wdt_miscdev = {