| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * SMsC 37B787 Watchdog Timer driver for Linux 2.6.x.x |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Based on acquirewdt.c by Alan Cox <alan@lxorguk.ukuu.org.uk> |
|---|
| 5 | 6 | * and some other existing drivers |
|---|
| 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. |
|---|
| 11 | 7 | * |
|---|
| 12 | 8 | * The authors do NOT admit liability nor provide warranty for |
|---|
| 13 | 9 | * any of this software. This material is provided "AS-IS" in |
|---|
| .. | .. |
|---|
| 40 | 36 | * mknod /dev/watchdog c 10 130 |
|---|
| 41 | 37 | * |
|---|
| 42 | 38 | * For an example userspace keep-alive daemon, see: |
|---|
| 43 | | - * Documentation/watchdog/wdt.txt |
|---|
| 39 | + * Documentation/watchdog/wdt.rst |
|---|
| 44 | 40 | */ |
|---|
| 45 | 41 | |
|---|
| 46 | 42 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 366 | 362 | pr_info("Watchdog enabled. Timeout set to %d %s\n", |
|---|
| 367 | 363 | timeout, (unit == UNIT_SECOND) ? "second(s)" : "minute(s)"); |
|---|
| 368 | 364 | |
|---|
| 369 | | - return nonseekable_open(inode, file); |
|---|
| 365 | + return stream_open(inode, file); |
|---|
| 370 | 366 | } |
|---|
| 371 | 367 | |
|---|
| 372 | 368 | /* close => shut off the timer */ |
|---|
| .. | .. |
|---|
| 478 | 474 | return -EINVAL; |
|---|
| 479 | 475 | timeout = new_timeout; |
|---|
| 480 | 476 | wb_smsc_wdt_set_timeout(timeout); |
|---|
| 481 | | - /* fall through and return the new timeout... */ |
|---|
| 477 | + fallthrough; /* and return the new timeout */ |
|---|
| 482 | 478 | case WDIOC_GETTIMEOUT: |
|---|
| 483 | 479 | new_timeout = timeout; |
|---|
| 484 | 480 | if (unit == UNIT_MINUTE) |
|---|
| .. | .. |
|---|
| 509 | 505 | .llseek = no_llseek, |
|---|
| 510 | 506 | .write = wb_smsc_wdt_write, |
|---|
| 511 | 507 | .unlocked_ioctl = wb_smsc_wdt_ioctl, |
|---|
| 508 | + .compat_ioctl = compat_ptr_ioctl, |
|---|
| 512 | 509 | .open = wb_smsc_wdt_open, |
|---|
| 513 | 510 | .release = wb_smsc_wdt_release, |
|---|
| 514 | 511 | }; |
|---|