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/scx200_wdt.c | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-) diff --git a/kernel/drivers/watchdog/scx200_wdt.c b/kernel/drivers/watchdog/scx200_wdt.c index 836377c..7b5e183 100644 --- a/kernel/drivers/watchdog/scx200_wdt.c +++ b/kernel/drivers/watchdog/scx200_wdt.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* drivers/char/watchdog/scx200_wdt.c National Semiconductor SCx200 Watchdog support @@ -8,10 +9,6 @@ National Semiconductor PC87307/PC97307 (ala SC1200) WDT driver (c) Copyright 2002 Zwane Mwaikambo <zwane@commfireservices.com> - 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 author(s) of this software shall not be held liable for damages of any nature resulting due to the use of this software. This @@ -102,7 +99,7 @@ return -EBUSY; scx200_wdt_enable(); - return nonseekable_open(inode, file); + return stream_open(inode, file); } static int scx200_wdt_release(struct inode *inode, struct file *file) @@ -189,6 +186,7 @@ margin = new_margin; scx200_wdt_update_margin(); scx200_wdt_ping(); + fallthrough; case WDIOC_GETTIMEOUT: if (put_user(margin, p)) return -EFAULT; @@ -203,6 +201,7 @@ .llseek = no_llseek, .write = scx200_wdt_write, .unlocked_ioctl = scx200_wdt_ioctl, + .compat_ioctl = compat_ptr_ioctl, .open = scx200_wdt_open, .release = scx200_wdt_release, }; @@ -262,10 +261,3 @@ module_init(scx200_wdt_init); module_exit(scx200_wdt_cleanup); - -/* - Local variables: - compile-command: "make -k -C ../.. SUBDIRS=drivers/char modules" - c-basic-offset: 8 - End: -*/ -- Gitblit v1.6.2