diff options
Diffstat (limited to 'drivers/watchdog/mixcomwd.c')
| -rw-r--r-- | drivers/watchdog/mixcomwd.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/watchdog/mixcomwd.c b/drivers/watchdog/mixcomwd.c index 3cc07447c655..1ecd5c48a005 100644 --- a/drivers/watchdog/mixcomwd.c +++ b/drivers/watchdog/mixcomwd.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * MixCom Watchdog: A Simple Hardware Watchdog Device * Based on Softdog driver by Alan Cox and PC Watchdog driver by Ken Hollis @@ -6,11 +7,6 @@ * * Copyright (c) 1999 ITConsult-Pro Co. <info@itc.hu> * - * 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. - * * Version 0.1 (99/04/15): * - first version * @@ -36,7 +32,6 @@ * - make mixcomwd_opened unsigned, * removed lock_kernel/unlock_kernel from mixcomwd_release, * modified ioctl a bit to conform to API - * */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -146,11 +141,11 @@ static int mixcomwd_open(struct inode *inode, struct file *file) __module_get(THIS_MODULE); else { if (mixcomwd_timer_alive) { - del_timer(&mixcomwd_timer); + timer_delete(&mixcomwd_timer); mixcomwd_timer_alive = 0; } } - return nonseekable_open(inode, file); + return stream_open(inode, file); } static int mixcomwd_release(struct inode *inode, struct file *file) @@ -229,9 +224,9 @@ static long mixcomwd_ioctl(struct file *file, static const struct file_operations mixcomwd_fops = { .owner = THIS_MODULE, - .llseek = no_llseek, .write = mixcomwd_write, .unlocked_ioctl = mixcomwd_ioctl, + .compat_ioctl = compat_ptr_ioctl, .open = mixcomwd_open, .release = mixcomwd_release, }; @@ -300,7 +295,7 @@ static void __exit mixcomwd_exit(void) if (!nowayout) { if (mixcomwd_timer_alive) { pr_warn("I quit now, hardware will probably reboot!\n"); - del_timer_sync(&mixcomwd_timer); + timer_delete_sync(&mixcomwd_timer); mixcomwd_timer_alive = 0; } } |
