diff options
Diffstat (limited to 'drivers/watchdog/wdt.c')
| -rw-r--r-- | drivers/watchdog/wdt.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c index e481fbbc4ae7..3980d60bacd8 100644 --- a/drivers/watchdog/wdt.c +++ b/drivers/watchdog/wdt.c @@ -1,14 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Industrial Computer Source WDT501 driver * * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>, * All Rights Reserved. * - * 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. - * * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide * warranty for any of this software. This material is provided * "AS-IS" and at no charge. @@ -393,7 +389,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if (wdt_set_heartbeat(new_heartbeat)) return -EINVAL; wdt_ping(); - /* Fall */ + fallthrough; case WDIOC_GETTIMEOUT: return put_user(heartbeat, p); default: @@ -421,7 +417,7 @@ static int wdt_open(struct inode *inode, struct file *file) * Activate */ wdt_start(); - return nonseekable_open(inode, file); + return stream_open(inode, file); } /** @@ -481,7 +477,7 @@ static ssize_t wdt_temp_read(struct file *file, char __user *buf, static int wdt_temp_open(struct inode *inode, struct file *file) { - return nonseekable_open(inode, file); + return stream_open(inode, file); } /** @@ -498,7 +494,7 @@ static int wdt_temp_release(struct inode *inode, struct file *file) } /** - * notify_sys: + * wdt_notify_sys: * @this: our notifier block * @code: the event being reported * @unused: unused @@ -524,9 +520,9 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code, static const struct file_operations wdt_fops = { .owner = THIS_MODULE, - .llseek = no_llseek, .write = wdt_write, .unlocked_ioctl = wdt_ioctl, + .compat_ioctl = compat_ptr_ioctl, .open = wdt_open, .release = wdt_release, }; @@ -539,7 +535,6 @@ static struct miscdevice wdt_miscdev = { static const struct file_operations wdt_temp_fops = { .owner = THIS_MODULE, - .llseek = no_llseek, .read = wdt_temp_read, .open = wdt_temp_open, .release = wdt_temp_release, @@ -561,7 +556,7 @@ static struct notifier_block wdt_notifier = { }; /** - * cleanup_module: + * wdt_exit: * * Unload the watchdog. You cannot do this with any file handles open. * If your watchdog is set to continue ticking on close and you unload |
