hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/it8712f_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * IT8712F "Smart Guardian" Watchdog support
34 *
....@@ -9,11 +10,6 @@
910 * drivers/hwmon/it87.c
1011 * IT8712F EC-LPC I/O Preliminary Specification 0.8.2
1112 * IT8712F EC-LPC I/O Preliminary Specification 0.9.3
12
- *
13
- * This program is free software; you can redistribute it and/or
14
- * modify it under the terms of the GNU General Public License as
15
- * published by the Free Software Foundation; either version 2 of the
16
- * License, or (at your option) any later version.
1713 *
1814 * The author(s) of this software shall not be held liable for damages
1915 * of any nature resulting due to the use of this software. This
....@@ -307,7 +303,7 @@
307303
308304 superio_exit();
309305 it8712f_wdt_ping();
310
- /* Fall through */
306
+ fallthrough;
311307 case WDIOC_GETTIMEOUT:
312308 if (put_user(margin, p))
313309 return -EFAULT;
....@@ -327,7 +323,7 @@
327323 ret = it8712f_wdt_enable();
328324 if (ret)
329325 return ret;
330
- return nonseekable_open(inode, file);
326
+ return stream_open(inode, file);
331327 }
332328
333329 static int it8712f_wdt_release(struct inode *inode, struct file *file)
....@@ -349,6 +345,7 @@
349345 .llseek = no_llseek,
350346 .write = it8712f_wdt_write,
351347 .unlocked_ioctl = it8712f_wdt_ioctl,
348
+ .compat_ioctl = compat_ptr_ioctl,
352349 .open = it8712f_wdt_open,
353350 .release = it8712f_wdt_release,
354351 };