hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/watchdog/advantechwdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Advantech Single Board Computer WDT driver
34 *
....@@ -8,11 +9,6 @@
89 *
910 * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
1011 * All Rights Reserved.
11
- *
12
- * This program is free software; you can redistribute it and/or
13
- * modify it under the terms of the GNU General Public License
14
- * as published by the Free Software Foundation; either version
15
- * 2 of the License, or (at your option) any later version.
1612 *
1713 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
1814 * warranty for any of this software. This material is provided
....@@ -181,7 +177,7 @@
181177 if (advwdt_set_heartbeat(new_timeout))
182178 return -EINVAL;
183179 advwdt_ping();
184
- /* fall through */
180
+ fallthrough;
185181 case WDIOC_GETTIMEOUT:
186182 return put_user(timeout, p);
187183 default:
....@@ -199,7 +195,7 @@
199195 */
200196
201197 advwdt_ping();
202
- return nonseekable_open(inode, file);
198
+ return stream_open(inode, file);
203199 }
204200
205201 static int advwdt_close(struct inode *inode, struct file *file)
....@@ -224,6 +220,7 @@
224220 .llseek = no_llseek,
225221 .write = advwdt_write,
226222 .unlocked_ioctl = advwdt_ioctl,
223
+ .compat_ioctl = compat_ptr_ioctl,
227224 .open = advwdt_open,
228225 .release = advwdt_close,
229226 };