From bedbef8ad3e75a304af6361af235302bcc61d06b Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 14 May 2024 06:39:01 +0000 Subject: [PATCH] 修改内核路径 --- kernel/drivers/watchdog/smsc37b787_wdt.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/kernel/drivers/watchdog/smsc37b787_wdt.c b/kernel/drivers/watchdog/smsc37b787_wdt.c index 445ea1a..7463df4 100644 --- a/kernel/drivers/watchdog/smsc37b787_wdt.c +++ b/kernel/drivers/watchdog/smsc37b787_wdt.c @@ -1,13 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * SMsC 37B787 Watchdog Timer driver for Linux 2.6.x.x * * Based on acquirewdt.c by Alan Cox <alan@lxorguk.ukuu.org.uk> * and some other existing drivers - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. * * The authors do NOT admit liability nor provide warranty for * any of this software. This material is provided "AS-IS" in @@ -40,7 +36,7 @@ * mknod /dev/watchdog c 10 130 * * For an example userspace keep-alive daemon, see: - * Documentation/watchdog/wdt.txt + * Documentation/watchdog/wdt.rst */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -366,7 +362,7 @@ pr_info("Watchdog enabled. Timeout set to %d %s\n", timeout, (unit == UNIT_SECOND) ? "second(s)" : "minute(s)"); - return nonseekable_open(inode, file); + return stream_open(inode, file); } /* close => shut off the timer */ @@ -478,7 +474,7 @@ return -EINVAL; timeout = new_timeout; wb_smsc_wdt_set_timeout(timeout); - /* fall through and return the new timeout... */ + fallthrough; /* and return the new timeout */ case WDIOC_GETTIMEOUT: new_timeout = timeout; if (unit == UNIT_MINUTE) @@ -509,6 +505,7 @@ .llseek = no_llseek, .write = wb_smsc_wdt_write, .unlocked_ioctl = wb_smsc_wdt_ioctl, + .compat_ioctl = compat_ptr_ioctl, .open = wb_smsc_wdt_open, .release = wb_smsc_wdt_release, }; -- Gitblit v1.6.2