aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/machzwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/machzwd.c')
-rw-r--r--drivers/watchdog/machzwd.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
index 88d823d87a4b..cef2baf59dda 100644
--- a/drivers/watchdog/machzwd.c
+++ b/drivers/watchdog/machzwd.c
@@ -1,12 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* MachZ ZF-Logic Watchdog Timer driver for Linux
*
- *
- * 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
* the hope that it may be useful for others.
@@ -15,7 +10,6 @@
*
* Based on sbc60xxwdt.c by Jakob Oestergaard
*
- *
* We have two timers (wd#1, wd#2) driven by a 32 KHz clock with the
* following periods:
* wd#1 - 2 seconds;
@@ -177,6 +171,7 @@ static inline void zf_set_timer(unsigned short new, unsigned char n)
switch (n) {
case WD1:
zf_writew(COUNTER_1, new);
+ /* fall through */
case WD2:
zf_writeb(COUNTER_2, new > 0xff ? 0xff : new);
default:
@@ -318,7 +313,7 @@ static long zf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case WDIOC_GETBOOTSTATUS:
return put_user(0, p);
case WDIOC_KEEPALIVE:
- zf_ping(0);
+ zf_ping(NULL);
break;
default:
return -ENOTTY;
@@ -333,7 +328,7 @@ static int zf_open(struct inode *inode, struct file *file)
if (nowayout)
__module_get(THIS_MODULE);
zf_timer_on();
- return nonseekable_open(inode, file);
+ return stream_open(inode, file);
}
static int zf_close(struct inode *inode, struct file *file)