hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/sc1200wdt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver
34 * (c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com>,
45 * All Rights Reserved.
56 * Based on wdt.c and wdt977.c by Alan Cox and Woody Suwalski respectively.
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 author(s) of this software shall not be held liable for damages
139 * of any nature resulting due to the use of this software. This
....@@ -28,7 +24,6 @@
2824 * 20020530 Joel Becker Add Matt Domsch's nowayout module
2925 * option
3026 * 20030116 Adam Belay Updated to the latest pnp code
31
- *
3227 */
3328
3429 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -178,7 +173,7 @@
178173 sc1200wdt_start();
179174 pr_info("Watchdog enabled, timeout = %d min(s)", timeout);
180175
181
- return nonseekable_open(inode, file);
176
+ return stream_open(inode, file);
182177 }
183178
184179
....@@ -239,7 +234,7 @@
239234 return -EINVAL;
240235 timeout = new_timeout;
241236 sc1200wdt_write_data(WDTO, timeout);
242
- /* fall through and return the new timeout */
237
+ fallthrough; /* and return the new timeout */
243238
244239 case WDIOC_GETTIMEOUT:
245240 return put_user(timeout * 60, p);
....@@ -312,6 +307,7 @@
312307 .llseek = no_llseek,
313308 .write = sc1200wdt_write,
314309 .unlocked_ioctl = sc1200wdt_ioctl,
310
+ .compat_ioctl = compat_ptr_ioctl,
315311 .open = sc1200wdt_open,
316312 .release = sc1200wdt_release,
317313 };