hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/watchdog/pc87413_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * NS pc87413-wdt Watchdog Timer driver for Linux 2.6.x.x
34 *
....@@ -5,11 +6,6 @@
56 *
67 * (C) Copyright 2006 Sven Anders, <anders@anduras.de>
78 * and Marcus Junker, <junker@anduras.de>
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License
11
- * as published by the Free Software Foundation; either version
12
- * 2 of the License, or (at your option) any later version.
139 *
1410 * Neither Sven Anders, Marcus Junker nor ANDURAS AG
1511 * admit liability nor provide warranty for any of this software.
....@@ -286,7 +282,7 @@
286282
287283 pr_info("Watchdog enabled. Timeout set to %d minute(s).\n", timeout);
288284
289
- return nonseekable_open(inode, file);
285
+ return stream_open(inode, file);
290286 }
291287
292288 /**
....@@ -437,7 +433,7 @@
437433 return -EINVAL;
438434 timeout = new_timeout;
439435 pc87413_refresh();
440
- /* fall through and return the new timeout... */
436
+ fallthrough; /* and return the new timeout */
441437 case WDIOC_GETTIMEOUT:
442438 new_timeout = timeout * 60;
443439 return put_user(new_timeout, uarg.i);
....@@ -477,6 +473,7 @@
477473 .llseek = no_llseek,
478474 .write = pc87413_write,
479475 .unlocked_ioctl = pc87413_ioctl,
476
+ .compat_ioctl = compat_ptr_ioctl,
480477 .open = pc87413_open,
481478 .release = pc87413_release,
482479 };