hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/watchdog/sbc60xxwdt.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * 60xx Single Board Computer Watchdog Timer driver for Linux 2.2.x
34 *
45 * Based on acquirewdt.c by Alan Cox.
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 *
117 * The author does NOT admit liability nor provide warranty for
128 * any of this software. This material is provided "AS-IS" in
....@@ -38,14 +34,12 @@
3834 * added extra printk's for startup problems
3935 * added MODULE_AUTHOR and MODULE_DESCRIPTION info
4036 *
41
- *
4237 * This WDT driver is different from the other Linux WDT
4338 * drivers in the following ways:
4439 * *) The driver will ping the watchdog by itself, because this
4540 * particular WDT has a very short timeout (one second) and it
4641 * would be insane to count on any userspace daemon always
4742 * getting scheduled within that time frame.
48
- *
4943 */
5044
5145 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -208,7 +202,7 @@
208202
209203 /* Good, fire up the show */
210204 wdt_startup();
211
- return nonseekable_open(inode, file);
205
+ return stream_open(inode, file);
212206 }
213207
214208 static int fop_close(struct inode *inode, struct file *file)
....@@ -270,8 +264,8 @@
270264
271265 timeout = new_timeout;
272266 wdt_keepalive();
273
- /* Fall through */
274267 }
268
+ fallthrough;
275269 case WDIOC_GETTIMEOUT:
276270 return put_user(timeout, p);
277271 default:
....@@ -286,6 +280,7 @@
286280 .open = fop_open,
287281 .release = fop_close,
288282 .unlocked_ioctl = fop_ioctl,
283
+ .compat_ioctl = compat_ptr_ioctl,
289284 };
290285
291286 static struct miscdevice wdt_miscdev = {