hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/wdt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Industrial Computer Source WDT501 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
....@@ -393,7 +389,7 @@
393389 if (wdt_set_heartbeat(new_heartbeat))
394390 return -EINVAL;
395391 wdt_ping();
396
- /* Fall */
392
+ fallthrough;
397393 case WDIOC_GETTIMEOUT:
398394 return put_user(heartbeat, p);
399395 default:
....@@ -421,7 +417,7 @@
421417 * Activate
422418 */
423419 wdt_start();
424
- return nonseekable_open(inode, file);
420
+ return stream_open(inode, file);
425421 }
426422
427423 /**
....@@ -481,7 +477,7 @@
481477
482478 static int wdt_temp_open(struct inode *inode, struct file *file)
483479 {
484
- return nonseekable_open(inode, file);
480
+ return stream_open(inode, file);
485481 }
486482
487483 /**
....@@ -527,6 +523,7 @@
527523 .llseek = no_llseek,
528524 .write = wdt_write,
529525 .unlocked_ioctl = wdt_ioctl,
526
+ .compat_ioctl = compat_ptr_ioctl,
530527 .open = wdt_open,
531528 .release = wdt_release,
532529 };