diff options
Diffstat (limited to 'drivers/watchdog/pc87413_wdt.c')
| -rw-r--r-- | drivers/watchdog/pc87413_wdt.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c index 5afb89b48650..fbf835d112b8 100644 --- a/drivers/watchdog/pc87413_wdt.c +++ b/drivers/watchdog/pc87413_wdt.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * NS pc87413-wdt Watchdog Timer driver for Linux 2.6.x.x * @@ -6,11 +7,6 @@ * (C) Copyright 2006 Sven Anders, <anders@anduras.de> * and Marcus Junker, <junker@anduras.de> * - * 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 Sven Anders, Marcus Junker nor ANDURAS AG * admit liability nor provide warranty for any of this software. * This material is provided "AS-IS" and at no charge. @@ -286,7 +282,7 @@ static int pc87413_open(struct inode *inode, struct file *file) pr_info("Watchdog enabled. Timeout set to %d minute(s).\n", timeout); - return nonseekable_open(inode, file); + return stream_open(inode, file); } /** @@ -437,7 +433,7 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd, return -EINVAL; timeout = new_timeout; pc87413_refresh(); - /* fall through and return the new timeout... */ + fallthrough; /* and return the new timeout */ case WDIOC_GETTIMEOUT: new_timeout = timeout * 60; return put_user(new_timeout, uarg.i); @@ -446,10 +442,10 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd, } } -/* -- Notifier funtions -----------------------------------------*/ +/* -- Notifier functions -----------------------------------------*/ /** - * notify_sys: + * pc87413_notify_sys: * @this: our notifier block * @code: the event being reported * @unused: unused @@ -474,9 +470,9 @@ static int pc87413_notify_sys(struct notifier_block *this, static const struct file_operations pc87413_fops = { .owner = THIS_MODULE, - .llseek = no_llseek, .write = pc87413_write, .unlocked_ioctl = pc87413_ioctl, + .compat_ioctl = compat_ptr_ioctl, .open = pc87413_open, .release = pc87413_release, }; @@ -512,9 +508,8 @@ static int __init pc87413_init(void) return -EBUSY; ret = register_reboot_notifier(&pc87413_notifier); - if (ret != 0) { + if (ret != 0) pr_err("cannot register reboot notifier (err=%d)\n", ret); - } ret = misc_register(&pc87413_miscdev); if (ret != 0) { @@ -575,14 +570,12 @@ static void __exit pc87413_exit(void) module_init(pc87413_init); module_exit(pc87413_exit); -MODULE_AUTHOR("Sven Anders <anders@anduras.de>, " - "Marcus Junker <junker@anduras.de>,"); +MODULE_AUTHOR("Sven Anders <anders@anduras.de>"); +MODULE_AUTHOR("Marcus Junker <junker@anduras.de>"); MODULE_DESCRIPTION("PC87413 WDT driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); - -module_param(io, int, 0); +module_param_hw(io, int, ioport, 0); MODULE_PARM_DESC(io, MODNAME " I/O port (default: " __MODULE_STRING(IO_DEFAULT) ")."); |
