.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * nv_tco 0.01: TCO timer driver for NV chipsets |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Based off i8xx_tco.c: |
---|
7 | 8 | * (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights |
---|
8 | 9 | * Reserved. |
---|
9 | | - * http://www.kernelconcepts.de |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or |
---|
12 | | - * modify it under the terms of the GNU General Public License |
---|
13 | | - * as published by the Free Software Foundation; either version |
---|
14 | | - * 2 of the License, or (at your option) any later version. |
---|
| 10 | + * https://www.kernelconcepts.de |
---|
15 | 11 | * |
---|
16 | 12 | * TCO timer driver for NV chipsets |
---|
17 | 13 | * based on softdog.c by Alan Cox <alan@redhat.com> |
---|
.. | .. |
---|
161 | 157 | /* Reload and activate timer */ |
---|
162 | 158 | tco_timer_keepalive(); |
---|
163 | 159 | tco_timer_start(); |
---|
164 | | - return nonseekable_open(inode, file); |
---|
| 160 | + return stream_open(inode, file); |
---|
165 | 161 | } |
---|
166 | 162 | |
---|
167 | 163 | static int nv_tco_release(struct inode *inode, struct file *file) |
---|
.. | .. |
---|
254 | 250 | if (tco_timer_set_heartbeat(new_heartbeat)) |
---|
255 | 251 | return -EINVAL; |
---|
256 | 252 | tco_timer_keepalive(); |
---|
257 | | - /* Fall through */ |
---|
| 253 | + fallthrough; |
---|
258 | 254 | case WDIOC_GETTIMEOUT: |
---|
259 | 255 | return put_user(heartbeat, p); |
---|
260 | 256 | default: |
---|
.. | .. |
---|
271 | 267 | .llseek = no_llseek, |
---|
272 | 268 | .write = nv_tco_write, |
---|
273 | 269 | .unlocked_ioctl = nv_tco_ioctl, |
---|
| 270 | + .compat_ioctl = compat_ptr_ioctl, |
---|
274 | 271 | .open = nv_tco_open, |
---|
275 | 272 | .release = nv_tco_release, |
---|
276 | 273 | }; |
---|