hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/wdt_pci.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Industrial Computer Source PCI-WDT500/501 driver
34 *
45 * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
56 * All Rights Reserved.
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; either version
10
- * 2 of the License, or (at your option) any later version.
117 *
128 * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
139 * warranty for any of this software. This material is provided
....@@ -430,7 +426,7 @@
430426 if (wdtpci_set_heartbeat(new_heartbeat))
431427 return -EINVAL;
432428 wdtpci_ping();
433
- /* fall through */
429
+ fallthrough;
434430 case WDIOC_GETTIMEOUT:
435431 return put_user(heartbeat, p);
436432 default:
....@@ -461,7 +457,7 @@
461457 * Activate
462458 */
463459 wdtpci_start();
464
- return nonseekable_open(inode, file);
460
+ return stream_open(inode, file);
465461 }
466462
467463 /**
....@@ -524,7 +520,7 @@
524520
525521 static int wdtpci_temp_open(struct inode *inode, struct file *file)
526522 {
527
- return nonseekable_open(inode, file);
523
+ return stream_open(inode, file);
528524 }
529525
530526 /**
....@@ -570,6 +566,7 @@
570566 .llseek = no_llseek,
571567 .write = wdtpci_write,
572568 .unlocked_ioctl = wdtpci_ioctl,
569
+ .compat_ioctl = compat_ptr_ioctl,
573570 .open = wdtpci_open,
574571 .release = wdtpci_release,
575572 };