hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/sch311x_wdt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * sch311x_wdt.c - Driver for the SCH311x Super-I/O chips
34 * integrated watchdog.
45 *
56 * (c) Copyright 2008 Wim Van Sebroeck <wim@iguana.be>.
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 * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
139 * provide warranty for any of this software. This material is
....@@ -299,7 +295,7 @@
299295 if (sch311x_wdt_set_heartbeat(new_timeout))
300296 return -EINVAL;
301297 sch311x_wdt_keepalive();
302
- /* Fall through */
298
+ fallthrough;
303299 case WDIOC_GETTIMEOUT:
304300 return put_user(timeout, p);
305301 default:
....@@ -316,7 +312,7 @@
316312 * Activate
317313 */
318314 sch311x_wdt_start();
319
- return nonseekable_open(inode, file);
315
+ return stream_open(inode, file);
320316 }
321317
322318 static int sch311x_wdt_close(struct inode *inode, struct file *file)
....@@ -341,6 +337,7 @@
341337 .llseek = no_llseek,
342338 .write = sch311x_wdt_write,
343339 .unlocked_ioctl = sch311x_wdt_ioctl,
340
+ .compat_ioctl = compat_ptr_ioctl,
344341 .open = sch311x_wdt_open,
345342 .release = sch311x_wdt_close,
346343 };