forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/drivers/watchdog/ib700wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * IB700 Single Board Computer WDT driver
34 *
....@@ -13,11 +14,6 @@
1314 *
1415 * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
1516 * All Rights Reserved.
16
- *
17
- * This program is free software; you can redistribute it and/or
18
- * modify it under the terms of the GNU General Public License
19
- * as published by the Free Software Foundation; either version
20
- * 2 of the License, or (at your option) any later version.
2117 *
2218 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
2319 * warranty for any of this software. This material is provided
....@@ -218,7 +214,7 @@
218214 if (ibwdt_set_heartbeat(new_margin))
219215 return -EINVAL;
220216 ibwdt_ping();
221
- /* fall through */
217
+ fallthrough;
222218
223219 case WDIOC_GETTIMEOUT:
224220 return put_user(timeout, p);
....@@ -238,7 +234,7 @@
238234
239235 /* Activate */
240236 ibwdt_ping();
241
- return nonseekable_open(inode, file);
237
+ return stream_open(inode, file);
242238 }
243239
244240 static int ibwdt_close(struct inode *inode, struct file *file)
....@@ -263,6 +259,7 @@
263259 .llseek = no_llseek,
264260 .write = ibwdt_write,
265261 .unlocked_ioctl = ibwdt_ioctl,
262
+ .compat_ioctl = compat_ptr_ioctl,
266263 .open = ibwdt_open,
267264 .release = ibwdt_close,
268265 };