hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/sbc7240_wdt.c
....@@ -1,19 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * NANO7240 SBC Watchdog device driver
34 *
45 * Based on w83877f.c by Scott Jennings,
56 *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation;
9
- *
10
- * Software distributed under the License is distributed on an "AS IS"
11
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or
12
- * implied. See the License for the specific language governing
13
- * rights and limitations under the License.
14
- *
157 * (c) Copyright 2007 Gilles GIGAN <gilles.gigan@jcu.edu.au>
16
- *
178 */
189
1910 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -136,7 +127,7 @@
136127
137128 wdt_enable();
138129
139
- return nonseekable_open(inode, file);
130
+ return stream_open(inode, file);
140131 }
141132
142133 static int fop_close(struct inode *inode, struct file *file)
....@@ -203,9 +194,8 @@
203194
204195 if (wdt_set_timeout(new_timeout))
205196 return -EINVAL;
206
-
207
- /* Fall through */
208197 }
198
+ fallthrough;
209199 case WDIOC_GETTIMEOUT:
210200 return put_user(timeout, (int __user *)arg);
211201 default:
....@@ -220,6 +210,7 @@
220210 .open = fop_open,
221211 .release = fop_close,
222212 .unlocked_ioctl = fop_ioctl,
213
+ .compat_ioctl = compat_ptr_ioctl,
223214 };
224215
225216 static struct miscdevice wdt_miscdev = {