.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver |
---|
3 | 4 | * (c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com>, |
---|
4 | 5 | * All Rights Reserved. |
---|
5 | 6 | * 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. |
---|
11 | 7 | * |
---|
12 | 8 | * The author(s) of this software shall not be held liable for damages |
---|
13 | 9 | * of any nature resulting due to the use of this software. This |
---|
.. | .. |
---|
28 | 24 | * 20020530 Joel Becker Add Matt Domsch's nowayout module |
---|
29 | 25 | * option |
---|
30 | 26 | * 20030116 Adam Belay Updated to the latest pnp code |
---|
31 | | - * |
---|
32 | 27 | */ |
---|
33 | 28 | |
---|
34 | 29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
178 | 173 | sc1200wdt_start(); |
---|
179 | 174 | pr_info("Watchdog enabled, timeout = %d min(s)", timeout); |
---|
180 | 175 | |
---|
181 | | - return nonseekable_open(inode, file); |
---|
| 176 | + return stream_open(inode, file); |
---|
182 | 177 | } |
---|
183 | 178 | |
---|
184 | 179 | |
---|
.. | .. |
---|
239 | 234 | return -EINVAL; |
---|
240 | 235 | timeout = new_timeout; |
---|
241 | 236 | sc1200wdt_write_data(WDTO, timeout); |
---|
242 | | - /* fall through and return the new timeout */ |
---|
| 237 | + fallthrough; /* and return the new timeout */ |
---|
243 | 238 | |
---|
244 | 239 | case WDIOC_GETTIMEOUT: |
---|
245 | 240 | return put_user(timeout * 60, p); |
---|
.. | .. |
---|
312 | 307 | .llseek = no_llseek, |
---|
313 | 308 | .write = sc1200wdt_write, |
---|
314 | 309 | .unlocked_ioctl = sc1200wdt_ioctl, |
---|
| 310 | + .compat_ioctl = compat_ptr_ioctl, |
---|
315 | 311 | .open = sc1200wdt_open, |
---|
316 | 312 | .release = sc1200wdt_release, |
---|
317 | 313 | }; |
---|