hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/wafer5823wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * ICP Wafer 5823 Single Board Computer WDT driver
34 * http://www.icpamerica.com/wafer_5823.php
....@@ -12,11 +13,6 @@
1213 *
1314 * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
1415 * All Rights Reserved.
15
- *
16
- * This program is free software; you can redistribute it and/or
17
- * modify it under the terms of the GNU General Public License
18
- * as published by the Free Software Foundation; either version
19
- * 2 of the License, or (at your option) any later version.
2016 *
2117 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
2218 * warranty for any of this software. This material is provided
....@@ -178,7 +174,7 @@
178174 timeout = new_timeout;
179175 wafwdt_stop();
180176 wafwdt_start();
181
- /* Fall through */
177
+ fallthrough;
182178 case WDIOC_GETTIMEOUT:
183179 return put_user(timeout, p);
184180
....@@ -197,7 +193,7 @@
197193 * Activate
198194 */
199195 wafwdt_start();
200
- return nonseekable_open(inode, file);
196
+ return stream_open(inode, file);
201197 }
202198
203199 static int wafwdt_close(struct inode *inode, struct file *file)
....@@ -234,6 +230,7 @@
234230 .llseek = no_llseek,
235231 .write = wafwdt_write,
236232 .unlocked_ioctl = wafwdt_ioctl,
233
+ .compat_ioctl = compat_ptr_ioctl,
237234 .open = wafwdt_open,
238235 .release = wafwdt_close,
239236 };