.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* drivers/char/watchdog/scx200_wdt.c |
---|
2 | 3 | |
---|
3 | 4 | National Semiconductor SCx200 Watchdog support |
---|
.. | .. |
---|
8 | 9 | National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver |
---|
9 | 10 | (c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com> |
---|
10 | 11 | |
---|
11 | | - This program is free software; you can redistribute it and/or |
---|
12 | | - modify it under the terms of the GNU General Public License as |
---|
13 | | - published by the Free Software Foundation; either version 2 of the |
---|
14 | | - License, or (at your option) any later version. |
---|
15 | 12 | |
---|
16 | 13 | The author(s) of this software shall not be held liable for damages |
---|
17 | 14 | of any nature resulting due to the use of this software. This |
---|
.. | .. |
---|
102 | 99 | return -EBUSY; |
---|
103 | 100 | scx200_wdt_enable(); |
---|
104 | 101 | |
---|
105 | | - return nonseekable_open(inode, file); |
---|
| 102 | + return stream_open(inode, file); |
---|
106 | 103 | } |
---|
107 | 104 | |
---|
108 | 105 | static int scx200_wdt_release(struct inode *inode, struct file *file) |
---|
.. | .. |
---|
189 | 186 | margin = new_margin; |
---|
190 | 187 | scx200_wdt_update_margin(); |
---|
191 | 188 | scx200_wdt_ping(); |
---|
| 189 | + fallthrough; |
---|
192 | 190 | case WDIOC_GETTIMEOUT: |
---|
193 | 191 | if (put_user(margin, p)) |
---|
194 | 192 | return -EFAULT; |
---|
.. | .. |
---|
203 | 201 | .llseek = no_llseek, |
---|
204 | 202 | .write = scx200_wdt_write, |
---|
205 | 203 | .unlocked_ioctl = scx200_wdt_ioctl, |
---|
| 204 | + .compat_ioctl = compat_ptr_ioctl, |
---|
206 | 205 | .open = scx200_wdt_open, |
---|
207 | 206 | .release = scx200_wdt_release, |
---|
208 | 207 | }; |
---|
.. | .. |
---|
262 | 261 | |
---|
263 | 262 | module_init(scx200_wdt_init); |
---|
264 | 263 | module_exit(scx200_wdt_cleanup); |
---|
265 | | - |
---|
266 | | -/* |
---|
267 | | - Local variables: |
---|
268 | | - compile-command: "make -k -C ../.. SUBDIRS=drivers/char modules" |
---|
269 | | - c-basic-offset: 8 |
---|
270 | | - End: |
---|
271 | | -*/ |
---|