forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/watchdog/pcwd_pci.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Berkshire PCI-PC Watchdog Card Driver
34 *
....@@ -9,11 +10,6 @@
910 * Alan Cox <alan@lxorguk.ukuu.org.uk>,
1011 * Matt Domsch <Matt_Domsch@dell.com>,
1112 * Rob Radez <rob@osinvestor.com>
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
15
- * as published by the Free Software Foundation; either version
16
- * 2 of the License, or (at your option) any later version.
1713 *
1814 * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
1915 * provide warranty for any of this software. This material is
....@@ -546,7 +542,7 @@
546542
547543 pcipcwd_keepalive();
548544 }
549
- /* fall through */
545
+ fallthrough;
550546
551547 case WDIOC_GETTIMEOUT:
552548 return put_user(heartbeat, p);
....@@ -578,7 +574,7 @@
578574 /* Activate */
579575 pcipcwd_start();
580576 pcipcwd_keepalive();
581
- return nonseekable_open(inode, file);
577
+ return stream_open(inode, file);
582578 }
583579
584580 static int pcipcwd_release(struct inode *inode, struct file *file)
....@@ -620,7 +616,7 @@
620616 if (!pcipcwd_private.supports_temp)
621617 return -ENODEV;
622618
623
- return nonseekable_open(inode, file);
619
+ return stream_open(inode, file);
624620 }
625621
626622 static int pcipcwd_temp_release(struct inode *inode, struct file *file)
....@@ -650,6 +646,7 @@
650646 .llseek = no_llseek,
651647 .write = pcipcwd_write,
652648 .unlocked_ioctl = pcipcwd_ioctl,
649
+ .compat_ioctl = compat_ptr_ioctl,
653650 .open = pcipcwd_open,
654651 .release = pcipcwd_release,
655652 };