hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/gef_wdt.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * GE watchdog userspace interface
34 *
45 * Author: Martyn Welch <martyn.welch@ge.com>
56 *
67 * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
128 *
139 * Based on: mv64x60_wdt.c (MV64X60 watchdog userspace interface)
1410 * Author: James Chapman <jchapman@katalix.com>
....@@ -205,7 +201,7 @@
205201 if (get_user(timeout, (int __user *)argp))
206202 return -EFAULT;
207203 gef_wdt_set_timeout(timeout);
208
- /* Fall through */
204
+ fallthrough;
209205
210206 case WDIOC_GETTIMEOUT:
211207 if (put_user(gef_wdt_timeout, (int __user *)argp))
....@@ -229,7 +225,7 @@
229225
230226 gef_wdt_handler_enable();
231227
232
- return nonseekable_open(inode, file);
228
+ return stream_open(inode, file);
233229 }
234230
235231 static int gef_wdt_release(struct inode *inode, struct file *file)
....@@ -252,6 +248,7 @@
252248 .llseek = no_llseek,
253249 .write = gef_wdt_write,
254250 .unlocked_ioctl = gef_wdt_ioctl,
251
+ .compat_ioctl = compat_ptr_ioctl,
255252 .open = gef_wdt_open,
256253 .release = gef_wdt_release,
257254 };