From ea08eeccae9297f7aabd2ef7f0c2517ac4549acc Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 20 Feb 2024 01:18:26 +0000
Subject: [PATCH] write in 30M
---
kernel/drivers/watchdog/sbc60xxwdt.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/kernel/drivers/watchdog/sbc60xxwdt.c b/kernel/drivers/watchdog/sbc60xxwdt.c
index 1702df7..7b97480 100644
--- a/kernel/drivers/watchdog/sbc60xxwdt.c
+++ b/kernel/drivers/watchdog/sbc60xxwdt.c
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* 60xx Single Board Computer Watchdog Timer driver for Linux 2.2.x
*
* Based on acquirewdt.c by Alan Cox.
- *
- * 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 does NOT admit liability nor provide warranty for
* any of this software. This material is provided "AS-IS" in
@@ -38,14 +34,12 @@
* added extra printk's for startup problems
* added MODULE_AUTHOR and MODULE_DESCRIPTION info
*
- *
* This WDT driver is different from the other Linux WDT
* drivers in the following ways:
* *) The driver will ping the watchdog by itself, because this
* particular WDT has a very short timeout (one second) and it
* would be insane to count on any userspace daemon always
* getting scheduled within that time frame.
- *
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -208,7 +202,7 @@
/* Good, fire up the show */
wdt_startup();
- return nonseekable_open(inode, file);
+ return stream_open(inode, file);
}
static int fop_close(struct inode *inode, struct file *file)
@@ -270,8 +264,8 @@
timeout = new_timeout;
wdt_keepalive();
- /* Fall through */
}
+ fallthrough;
case WDIOC_GETTIMEOUT:
return put_user(timeout, p);
default:
@@ -286,6 +280,7 @@
.open = fop_open,
.release = fop_close,
.unlocked_ioctl = fop_ioctl,
+ .compat_ioctl = compat_ptr_ioctl,
};
static struct miscdevice wdt_miscdev = {
--
Gitblit v1.6.2