hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/watchdog/scx200_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* drivers/char/watchdog/scx200_wdt.c
23
34 National Semiconductor SCx200 Watchdog support
....@@ -8,10 +9,6 @@
89 National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver
910 (c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com>
1011
11
- This program is free software; you can redistribute it and/or
12
- modify it under the terms of the GNU General Public License as
13
- published by the Free Software Foundation; either version 2 of the
14
- License, or (at your option) any later version.
1512
1613 The author(s) of this software shall not be held liable for damages
1714 of any nature resulting due to the use of this software. This
....@@ -102,7 +99,7 @@
10299 return -EBUSY;
103100 scx200_wdt_enable();
104101
105
- return nonseekable_open(inode, file);
102
+ return stream_open(inode, file);
106103 }
107104
108105 static int scx200_wdt_release(struct inode *inode, struct file *file)
....@@ -189,6 +186,7 @@
189186 margin = new_margin;
190187 scx200_wdt_update_margin();
191188 scx200_wdt_ping();
189
+ fallthrough;
192190 case WDIOC_GETTIMEOUT:
193191 if (put_user(margin, p))
194192 return -EFAULT;
....@@ -203,6 +201,7 @@
203201 .llseek = no_llseek,
204202 .write = scx200_wdt_write,
205203 .unlocked_ioctl = scx200_wdt_ioctl,
204
+ .compat_ioctl = compat_ptr_ioctl,
206205 .open = scx200_wdt_open,
207206 .release = scx200_wdt_release,
208207 };
....@@ -262,10 +261,3 @@
262261
263262 module_init(scx200_wdt_init);
264263 module_exit(scx200_wdt_cleanup);
265
-
266
-/*
267
- Local variables:
268
- compile-command: "make -k -C ../.. SUBDIRS=drivers/char modules"
269
- c-basic-offset: 8
270
- End:
271
-*/