hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/watchdog/nv_tco.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * nv_tco 0.01: TCO timer driver for NV chipsets
34 *
....@@ -6,12 +7,7 @@
67 * Based off i8xx_tco.c:
78 * (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights
89 * 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
1511 *
1612 * TCO timer driver for NV chipsets
1713 * based on softdog.c by Alan Cox <alan@redhat.com>
....@@ -161,7 +157,7 @@
161157 /* Reload and activate timer */
162158 tco_timer_keepalive();
163159 tco_timer_start();
164
- return nonseekable_open(inode, file);
160
+ return stream_open(inode, file);
165161 }
166162
167163 static int nv_tco_release(struct inode *inode, struct file *file)
....@@ -254,7 +250,7 @@
254250 if (tco_timer_set_heartbeat(new_heartbeat))
255251 return -EINVAL;
256252 tco_timer_keepalive();
257
- /* Fall through */
253
+ fallthrough;
258254 case WDIOC_GETTIMEOUT:
259255 return put_user(heartbeat, p);
260256 default:
....@@ -271,6 +267,7 @@
271267 .llseek = no_llseek,
272268 .write = nv_tco_write,
273269 .unlocked_ioctl = nv_tco_ioctl,
270
+ .compat_ioctl = compat_ptr_ioctl,
274271 .open = nv_tco_open,
275272 .release = nv_tco_release,
276273 };