Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[WATCHDOG] More coding-style and trivial clean-up

Some more cleaning-up of the watchdog drivers.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

+340 -232
+4 -4
drivers/watchdog/acquirewdt.c
··· 1 1 /* 2 2 * Acquire Single Board Computer Watchdog Timer driver 3 3 * 4 - * Based on wdt.c. Original copyright messages: 4 + * Based on wdt.c. Original copyright messages: 5 5 * 6 6 * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, 7 7 * All Rights Reserved. ··· 17 17 * 18 18 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> 19 19 * 20 - * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com> 21 - * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT 22 - * Can't add timeout - driver doesn't allow changing value 20 + * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com> 21 + * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT 22 + * Can't add timeout - driver doesn't allow changing value 23 23 */ 24 24 25 25 /*
+5 -2
drivers/watchdog/advantechwdt.c
··· 138 138 void __user *argp = (void __user *)arg; 139 139 int __user *p = argp; 140 140 static struct watchdog_info ident = { 141 - .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE, 141 + .options = WDIOF_KEEPALIVEPING | 142 + WDIOF_SETTIMEOUT | 143 + WDIOF_MAGICCLOSE, 142 144 .firmware_version = 1, 143 145 .identity = WATCHDOG_NAME, 144 146 }; ··· 261 259 goto unreg_stop; 262 260 } 263 261 264 - /* Check that the heartbeat value is within it's range ; if not reset to the default */ 262 + /* Check that the heartbeat value is within it's range ; 263 + * if not reset to the default */ 265 264 if (advwdt_set_heartbeat(timeout)) { 266 265 advwdt_set_heartbeat(WATCHDOG_TIMEOUT); 267 266 printk(KERN_INFO PFX
+10 -10
drivers/watchdog/alim1535_wdt.c
··· 60 60 61 61 pci_read_config_dword(ali_pci, 0xCC, &val); 62 62 val &= ~0x3F; /* Mask count */ 63 - val |= (1<<25) | ali_timeout_bits; 63 + val |= (1 << 25) | ali_timeout_bits; 64 64 pci_write_config_dword(ali_pci, 0xCC, val); 65 65 66 66 spin_unlock(&ali_lock); ··· 79 79 spin_lock(&ali_lock); 80 80 81 81 pci_read_config_dword(ali_pci, 0xCC, &val); 82 - val &= ~0x3F; /* Mask count to zero (disabled) */ 83 - val &= ~(1<<25);/* and for safety mask the reset enable */ 82 + val &= ~0x3F; /* Mask count to zero (disabled) */ 83 + val &= ~(1 << 25); /* and for safety mask the reset enable */ 84 84 pci_write_config_dword(ali_pci, 0xCC, val); 85 85 86 86 spin_unlock(&ali_lock); ··· 89 89 /* 90 90 * ali_keepalive - send a keepalive to the watchdog 91 91 * 92 - * Send a keepalive to the timer (actually we restart the timer). 92 + * Send a keepalive to the timer (actually we restart the timer). 93 93 */ 94 94 95 95 static void ali_keepalive(void) ··· 109 109 if (t < 0) 110 110 return -EINVAL; 111 111 else if (t < 60) 112 - ali_timeout_bits = t|(1<<6); 112 + ali_timeout_bits = t|(1 << 6); 113 113 else if (t < 3600) 114 - ali_timeout_bits = (t/60)|(1<<7); 114 + ali_timeout_bits = (t / 60)|(1 << 7); 115 115 else if (t < 18000) 116 - ali_timeout_bits = (t/300)|(1<<6)|(1<<7); 116 + ali_timeout_bits = (t / 300)|(1 << 6)|(1 << 7); 117 117 else 118 118 return -EINVAL; 119 119 ··· 138 138 */ 139 139 140 140 static ssize_t ali_write(struct file *file, const char __user *data, 141 - size_t len, loff_t *ppos) 141 + size_t len, loff_t *ppos) 142 142 { 143 143 /* See if we got the magic character 'V' and reload the timer */ 144 144 if (len) { ··· 348 348 /* Timer bits */ 349 349 wdog &= ~0x3F; 350 350 /* Issued events */ 351 - wdog &= ~((1<<27)|(1<<26)|(1<<25)|(1<<24)); 351 + wdog &= ~((1 << 27)|(1 << 26)|(1 << 25)|(1 << 24)); 352 352 /* No monitor bits */ 353 - wdog &= ~((1<<16)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<9)); 353 + wdog &= ~((1 << 16)|(1 << 13)|(1 << 12)|(1 << 11)|(1 << 10)|(1 << 9)); 354 354 355 355 pci_write_config_dword(pdev, 0xCC, wdog); 356 356
+4 -2
drivers/watchdog/alim7101_wdt.c
··· 355 355 alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, 356 356 NULL); 357 357 if (!alim7101_pmu) { 358 - printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n"); 358 + printk(KERN_INFO PFX 359 + "ALi M7101 PMU not present - WDT not set\n"); 359 360 return -EBUSY; 360 361 } 361 362 ··· 400 399 401 400 rc = misc_register(&wdt_miscdev); 402 401 if (rc) { 403 - printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 402 + printk(KERN_ERR PFX 403 + "cannot register miscdev on minor=%d (err=%d)\n", 404 404 wdt_miscdev.minor, rc); 405 405 goto err_out_reboot; 406 406 }
+1 -1
drivers/watchdog/at91sam9_wdt.c
··· 201 201 * Pat the watchdog whenever device is written to. 202 202 */ 203 203 static ssize_t at91_wdt_write(struct file *file, const char *data, size_t len, 204 - loff_t *ppos) 204 + loff_t *ppos) 205 205 { 206 206 if (!len) 207 207 return 0;
+11 -11
drivers/watchdog/eurotechwdt.c
··· 8 8 * Based on wdt.c. 9 9 * Original copyright messages: 10 10 * 11 - * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>, 11 + * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>, 12 12 * All Rights Reserved. 13 13 * 14 - * This program is free software; you can redistribute it and/or 15 - * modify it under the terms of the GNU General Public License 16 - * as published by the Free Software Foundation; either version 17 - * 2 of the License, or (at your option) any later version. 14 + * This program is free software; you can redistribute it and/or 15 + * modify it under the terms of the GNU General Public License 16 + * as published by the Free Software Foundation; either version 17 + * 2 of the License, or (at your option) any later version. 18 18 * 19 - * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide 20 - * warranty for any of this software. This material is provided 21 - * "AS-IS" and at no charge. 19 + * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide 20 + * warranty for any of this software. This material is provided 21 + * "AS-IS" and at no charge. 22 22 * 23 - * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>* 23 + * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>* 24 24 */ 25 25 26 26 /* Changelog: ··· 37 37 * add expect_close support 38 38 * 39 39 * 2002.05.30 - Joel Becker <joel.becker@oracle.com> 40 - * Added Matt Domsch's nowayout module option. 40 + * Added Matt Domsch's nowayout module option. 41 41 */ 42 42 43 43 /* ··· 151 151 if (irq == 0) 152 152 printk(KERN_INFO ": interrupt disabled\n"); 153 153 154 - eurwdt_write_reg(WDT_TIMER_CFG, irq<<4); 154 + eurwdt_write_reg(WDT_TIMER_CFG, irq << 4); 155 155 156 156 eurwdt_write_reg(WDT_UNIT_SEL, WDT_UNIT_SECS); /* we use seconds */ 157 157 eurwdt_set_timeout(0); /* the default timeout */
+8 -3
drivers/watchdog/geodewdt.c
··· 34 34 35 35 static int timeout = WATCHDOG_TIMEOUT; 36 36 module_param(timeout, int, 0); 37 - MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=131, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) "."); 37 + MODULE_PARM_DESC(timeout, 38 + "Watchdog timeout in seconds. 1<= timeout <=131, default=" 39 + __MODULE_STRING(WATCHDOG_TIMEOUT) "."); 38 40 39 41 static int nowayout = WATCHDOG_NOWAYOUT; 40 42 module_param(nowayout, int, 0); 41 - MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 43 + MODULE_PARM_DESC(nowayout, 44 + "Watchdog cannot be stopped once started (default=" 45 + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 42 46 43 47 static struct platform_device *geodewdt_platform_device; 44 48 static unsigned long wdt_flags; ··· 273 269 if (ret) 274 270 return ret; 275 271 276 - geodewdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0); 272 + geodewdt_platform_device = platform_device_register_simple(DRV_NAME, 273 + -1, NULL, 0); 277 274 if (IS_ERR(geodewdt_platform_device)) { 278 275 ret = PTR_ERR(geodewdt_platform_device); 279 276 goto err;
+2 -1
drivers/watchdog/hpwdt.c
··· 137 137 }; 138 138 MODULE_DEVICE_TABLE(pci, hpwdt_devices); 139 139 140 - extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs, unsigned long *pRomEntry); 140 + extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs, 141 + unsigned long *pRomEntry); 141 142 142 143 #ifndef CONFIG_X86_64 143 144 /* --32 Bit Bios------------------------------------------------------------ */
+2 -1
drivers/watchdog/i6300esb.c
··· 240 240 * five months ago... */ 241 241 esb_expect_close = 0; 242 242 243 - /* scan to see whether or not we got the magic character */ 243 + /* scan to see whether or not we got the 244 + * magic character */ 244 245 for (i = 0; i != len; i++) { 245 246 char c; 246 247 if (get_user(c, data + i))
+4 -2
drivers/watchdog/iTCO_vendor_support.c
··· 47 47 48 48 static int vendorsupport; 49 49 module_param(vendorsupport, int, 0); 50 - MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default=0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+"); 50 + MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default=" 51 + "0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+"); 51 52 52 53 /* 53 54 * Vendor Specific Support ··· 306 305 module_init(iTCO_vendor_init_module); 307 306 module_exit(iTCO_vendor_exit_module); 308 307 309 - MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, R. Seretny <lkpatches@paypc.com>"); 308 + MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, " 309 + "R. Seretny <lkpatches@paypc.com>"); 310 310 MODULE_DESCRIPTION("Intel TCO Vendor Specific WatchDog Timer Driver Support"); 311 311 MODULE_VERSION(DRV_VERSION); 312 312 MODULE_LICENSE("GPL");
+10 -5
drivers/watchdog/iTCO_wdt.c
··· 273 273 #define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */ 274 274 static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */ 275 275 module_param(heartbeat, int, 0); 276 - MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<heartbeat<39 (TCO v1) or 613 (TCO v2), default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 276 + MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. " 277 + "(2<heartbeat<39 (TCO v1) or 613 (TCO v2), default=" 278 + __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 277 279 278 280 static int nowayout = WATCHDOG_NOWAYOUT; 279 281 module_param(nowayout, int, 0); ··· 348 346 /* disable chipset's NO_REBOOT bit */ 349 347 if (iTCO_wdt_unset_NO_REBOOT_bit()) { 350 348 spin_unlock(&iTCO_wdt_private.io_lock); 351 - printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n"); 349 + printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, " 350 + "reboot disabled by hardware\n"); 352 351 return -EIO; 353 352 } 354 353 ··· 672 669 673 670 /* Check chipset's NO_REBOOT bit */ 674 671 if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) { 675 - printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n"); 672 + printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, " 673 + "reboot disabled by hardware\n"); 676 674 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */ 677 675 goto out; 678 676 } ··· 720 716 if not reset to the default */ 721 717 if (iTCO_wdt_set_heartbeat(heartbeat)) { 722 718 iTCO_wdt_set_heartbeat(WATCHDOG_HEARTBEAT); 723 - printk(KERN_INFO PFX "heartbeat value must be 2 < heartbeat < 39 (TCO v1) or 613 (TCO v2), using %d\n", 724 - heartbeat); 719 + printk(KERN_INFO PFX 720 + "heartbeat value must be 2 < heartbeat < 39 (TCO v1) " 721 + "or 613 (TCO v2), using %d\n", heartbeat); 725 722 } 726 723 727 724 ret = misc_register(&iTCO_wdt_miscdev);
+6 -6
drivers/watchdog/it87_wdt.c
··· 188 188 189 189 static inline void superio_outb(int val, int reg) 190 190 { 191 - outb(reg, REG); 192 - outb(val, VAL); 191 + outb(reg, REG); 192 + outb(val, VAL); 193 193 } 194 194 195 195 static inline int superio_inw(int reg) ··· 204 204 205 205 static inline void superio_outw(int val, int reg) 206 206 { 207 - outb(reg++, REG); 208 - outb(val >> 8, VAL); 209 - outb(reg, REG); 210 - outb(val, VAL); 207 + outb(reg++, REG); 208 + outb(val >> 8, VAL); 209 + outb(reg, REG); 210 + outb(val, VAL); 211 211 } 212 212 213 213 /* watchdog timer handling */
+2 -2
drivers/watchdog/mpc5200_wdt.c
··· 9 9 #include <asm/mpc52xx.h> 10 10 11 11 12 - #define GPT_MODE_WDT (1<<15) 13 - #define GPT_MODE_CE (1<<12) 12 + #define GPT_MODE_WDT (1 << 15) 13 + #define GPT_MODE_CE (1 << 12) 14 14 #define GPT_MODE_MS_TIMER (0x4) 15 15 16 16
+1 -1
drivers/watchdog/mpcore_wdt.c
··· 5 5 * 6 6 * Based on the SoftDog driver: 7 7 * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, 8 - * All Rights Reserved. 8 + * All Rights Reserved. 9 9 * 10 10 * This program is free software; you can redistribute it and/or 11 11 * modify it under the terms of the GNU General Public License
+1 -1
drivers/watchdog/mtx-1_wdt.c
··· 5 5 * All Rights Reserved. 6 6 * http://www.4g-systems.biz 7 7 * 8 - * (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org> 8 + * (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org> 9 9 * 10 10 * This program is free software; you can redistribute it and/or 11 11 * modify it under the terms of the GNU General Public License
+4 -2
drivers/watchdog/pc87413_wdt.c
··· 536 536 537 537 ret = misc_register(&pc87413_miscdev); 538 538 if (ret != 0) { 539 - printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 539 + printk(KERN_ERR PFX 540 + "cannot register miscdev on minor=%d (err=%d)\n", 540 541 WATCHDOG_MINOR, ret); 541 542 unregister_reboot_notifier(&pc87413_notifier); 542 543 return ret; ··· 575 574 module_init(pc87413_init); 576 575 module_exit(pc87413_exit); 577 576 578 - MODULE_AUTHOR("Sven Anders <anders@anduras.de>, Marcus Junker <junker@anduras.de>,"); 577 + MODULE_AUTHOR("Sven Anders <anders@anduras.de>, " 578 + "Marcus Junker <junker@anduras.de>,"); 579 579 MODULE_DESCRIPTION("PC87413 WDT driver"); 580 580 MODULE_LICENSE("GPL"); 581 581
+25 -19
drivers/watchdog/pcwd.c
··· 24 24 * version reporting. Added read routine for temperature. 25 25 * Removed some extra defines, added an autodetect Revision 26 26 * routine. 27 - * 961006 Revised some documentation, fixed some cosmetic bugs. Made 28 - * drivers to panic the system if it's overheating at bootup. 27 + * 961006 Revised some documentation, fixed some cosmetic bugs. Made 28 + * drivers to panic the system if it's overheating at bootup. 29 29 * 961118 Changed some verbiage on some of the output, tidied up 30 30 * code bits, and added compatibility to 2.1.x. 31 - * 970912 Enabled board on open and disable on close. 31 + * 970912 Enabled board on open and disable on close. 32 32 * 971107 Took account of recent VFS changes (broke read). 33 - * 971210 Disable board on initialisation in case board already ticking. 34 - * 971222 Changed open/close for temperature handling 35 - * Michael Meskes <meskes@debian.org>. 36 - * 980112 Used minor numbers from include/linux/miscdevice.h 37 - * 990403 Clear reset status after reading control status register in 38 - * pcwd_showprevstate(). [Marc Boucher <marc@mbsi.ca>] 33 + * 971210 Disable board on initialisation in case board already ticking. 34 + * 971222 Changed open/close for temperature handling 35 + * Michael Meskes <meskes@debian.org>. 36 + * 980112 Used minor numbers from include/linux/miscdevice.h 37 + * 990403 Clear reset status after reading control status register in 38 + * pcwd_showprevstate(). [Marc Boucher <marc@mbsi.ca>] 39 39 * 990605 Made changes to code to support Firmware 1.22a, added 40 40 * fairly useless proc entry. 41 41 * 990610 removed said useless proc code for the merge <alan> 42 42 * 000403 Removed last traces of proc code. <davej> 43 43 * 011214 Added nowayout module option to override 44 44 * CONFIG_WATCHDOG_NOWAYOUT <Matt_Domsch@dell.com> 45 - * Added timeout module option to override default 45 + * Added timeout module option to override default 46 46 */ 47 47 48 48 /* ··· 76 76 #define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog" 77 77 #define WATCHDOG_NAME "pcwd" 78 78 #define PFX WATCHDOG_NAME ": " 79 - #define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n" 80 - #define WD_VER WATCHDOG_VERSION " (" WATCHDOG_DATE ")" 79 + #define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION "\n" 81 80 82 81 /* 83 82 * It should be noted that PCWD_REVISION_B was removed because A and B ··· 199 200 #define WATCHDOG_HEARTBEAT 0 200 201 static int heartbeat = WATCHDOG_HEARTBEAT; 201 202 module_param(heartbeat, int, 0); 202 - MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 203 + MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. " 204 + "(2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default=" 205 + __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 203 206 204 207 static int nowayout = WATCHDOG_NOWAYOUT; 205 208 module_param(nowayout, int, 0); ··· 240 239 } 241 240 242 241 if (debug >= DEBUG) 243 - printk(KERN_DEBUG PFX "received following data for cmd=0x%02x: port0=0x%02x last_port0=0x%02x\n", 242 + printk(KERN_DEBUG PFX "received following data for " 243 + "cmd=0x%02x: port0=0x%02x last_port0=0x%02x\n", 244 244 cmd, port0, last_port0); 245 245 246 246 return port0; ··· 341 339 pcwd_private.io_addr); 342 340 else if (pcwd_private.revision == PCWD_REVISION_C) { 343 341 pcwd_get_firmware(); 344 - printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n", 342 + printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port " 343 + "0x%04x (Firmware version: %s)\n", 345 344 pcwd_private.io_addr, pcwd_private.fw_ver_str); 346 345 option_switches = pcwd_get_option_switches(); 347 - printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", 346 + printk(KERN_INFO PFX "Option switches (0x%02x): " 347 + "Temperature Reset Enable=%s, Power On Delay=%s\n", 348 348 option_switches, 349 349 ((option_switches & 0x10) ? "ON" : "OFF"), 350 350 ((option_switches & 0x08) ? "ON" : "OFF")); ··· 362 358 printk(KERN_INFO PFX "Temperature Option Detected\n"); 363 359 364 360 if (pcwd_private.boot_status & WDIOF_CARDRESET) 365 - printk(KERN_INFO PFX "Previous reboot was caused by the card\n"); 361 + printk(KERN_INFO PFX 362 + "Previous reboot was caused by the card\n"); 366 363 367 364 if (pcwd_private.boot_status & WDIOF_OVERHEAT) { 368 365 printk(KERN_EMERG PFX ··· 876 871 cards_found++; 877 872 if (cards_found == 1) 878 873 printk(KERN_INFO PFX "v%s Ken Hollis (kenji@bitgate.com)\n", 879 - WD_VER); 874 + WATCHDOG_VERSION); 880 875 881 876 if (cards_found > 1) { 882 877 printk(KERN_ERR PFX "This driver only supports 1 device\n"); ··· 1031 1026 module_init(pcwd_init_module); 1032 1027 module_exit(pcwd_cleanup_module); 1033 1028 1034 - MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, Wim Van Sebroeck <wim@iguana.be>"); 1029 + MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, " 1030 + "Wim Van Sebroeck <wim@iguana.be>"); 1035 1031 MODULE_DESCRIPTION("Berkshire ISA-PC Watchdog driver"); 1036 1032 MODULE_VERSION(WATCHDOG_VERSION); 1037 1033 MODULE_LICENSE("GPL");
+69 -39
drivers/watchdog/pcwd_pci.c
··· 24 24 * A bells and whistles driver is available from: 25 25 * http://www.kernel.org/pub/linux/kernel/people/wim/pcwd/pcwd_pci/ 26 26 * 27 - * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ 27 + * More info available at 28 + * http://www.berkprod.com/ or http://www.pcwatchdog.com/ 28 29 */ 29 30 30 31 /* ··· 52 51 53 52 /* Module and version information */ 54 53 #define WATCHDOG_VERSION "1.03" 55 - #define WATCHDOG_DATE "21 Jan 2007" 56 54 #define WATCHDOG_DRIVER_NAME "PCI-PC Watchdog" 57 55 #define WATCHDOG_NAME "pcwd_pci" 58 56 #define PFX WATCHDOG_NAME ": " 59 - #define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n" 57 + #define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION "\n" 60 58 61 59 /* Stuff for the PCI ID's */ 62 60 #ifndef PCI_VENDOR_ID_QUICKLOGIC ··· 76 76 #define WD_PCI_TTRP 0x04 /* Temperature Trip status */ 77 77 #define WD_PCI_RL2A 0x08 /* Relay 2 Active */ 78 78 #define WD_PCI_RL1A 0x10 /* Relay 1 Active */ 79 - #define WD_PCI_R2DS 0x40 /* Relay 2 Disable Temperature-trip/reset */ 79 + #define WD_PCI_R2DS 0x40 /* Relay 2 Disable Temperature-trip / 80 + reset */ 80 81 #define WD_PCI_RLY2 0x80 /* Activate Relay 2 on the board */ 81 82 /* Port 2 : Control Status #2 */ 82 83 #define WD_PCI_WDIS 0x10 /* Watchdog Disable */ ··· 115 114 static int temp_panic; 116 115 static unsigned long is_active; 117 116 static char expect_release; 118 - static struct { /* this is private data for each PCI-PC watchdog card */ 119 - int supports_temp; /* Wether or not the card has a temperature device */ 120 - int boot_status; /* The card's boot status */ 121 - unsigned long io_addr; /* The cards I/O address */ 122 - spinlock_t io_lock; /* the lock for io operations */ 123 - struct pci_dev *pdev; /* the PCI-device */ 117 + /* this is private data for each PCI-PC watchdog card */ 118 + static struct { 119 + /* Wether or not the card has a temperature device */ 120 + int supports_temp; 121 + /* The card's boot status */ 122 + int boot_status; 123 + /* The cards I/O address */ 124 + unsigned long io_addr; 125 + /* the lock for io operations */ 126 + spinlock_t io_lock; 127 + /* the PCI-device */ 128 + struct pci_dev *pdev; 124 129 } pcipcwd_private; 125 130 126 131 /* module parameters */ ··· 137 130 module_param(debug, int, 0); 138 131 MODULE_PARM_DESC(debug, "Debug level: 0=Quiet, 1=Verbose, 2=Debug (default=0)"); 139 132 140 - #define WATCHDOG_HEARTBEAT 0 /* default heartbeat = delay-time from dip-switches */ 133 + #define WATCHDOG_HEARTBEAT 0 /* default heartbeat = 134 + delay-time from dip-switches */ 141 135 static int heartbeat = WATCHDOG_HEARTBEAT; 142 136 module_param(heartbeat, int, 0); 143 - MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 137 + MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. " 138 + "(0<heartbeat<65536 or 0=delay-time from dip-switches, default=" 139 + __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 144 140 145 141 static int nowayout = WATCHDOG_NOWAYOUT; 146 142 module_param(nowayout, int, 0); 147 - MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 143 + MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 144 + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 148 145 149 146 /* 150 147 * Internal functions ··· 159 148 int got_response, count; 160 149 161 150 if (debug >= DEBUG) 162 - printk(KERN_DEBUG PFX "sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x\n", 163 - cmd, *msb, *lsb); 151 + printk(KERN_DEBUG PFX "sending following data " 152 + "cmd=0x%02x msb=0x%02x lsb=0x%02x\n", cmd, *msb, *lsb); 164 153 165 154 spin_lock(&pcipcwd_private.io_lock); 166 155 /* If a command requires data it should be written first. ··· 177 166 * the WRSP bit in port 2 and give it a max. timeout of 178 167 * PCI_COMMAND_TIMEOUT to process */ 179 168 got_response = inb_p(pcipcwd_private.io_addr + 2) & WD_PCI_WRSP; 180 - for (count = 0; (count < PCI_COMMAND_TIMEOUT) && (!got_response); count++) { 169 + for (count = 0; (count < PCI_COMMAND_TIMEOUT) && (!got_response); 170 + count++) { 181 171 mdelay(1); 182 172 got_response = inb_p(pcipcwd_private.io_addr + 2) & WD_PCI_WRSP; 183 173 } 184 174 185 175 if (debug >= DEBUG) { 186 176 if (got_response) { 187 - printk(KERN_DEBUG PFX "time to process command was: %d ms\n", 177 + printk(KERN_DEBUG PFX 178 + "time to process command was: %d ms\n", 188 179 count); 189 180 } else { 190 - printk(KERN_DEBUG PFX "card did not respond on command!\n"); 181 + printk(KERN_DEBUG PFX 182 + "card did not respond on command!\n"); 191 183 } 192 184 } 193 185 ··· 203 189 inb_p(pcipcwd_private.io_addr + 6); 204 190 205 191 if (debug >= DEBUG) 206 - printk(KERN_DEBUG PFX "received following data for cmd=0x%02x: msb=0x%02x lsb=0x%02x\n", 192 + printk(KERN_DEBUG PFX "received following data for " 193 + "cmd=0x%02x: msb=0x%02x lsb=0x%02x\n", 207 194 cmd, *msb, *lsb); 208 195 } 209 196 ··· 233 218 char fw_ver_str[20]; /* The cards firmware version */ 234 219 int option_switches; 235 220 236 - got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor); 221 + got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major, 222 + &fw_rev_minor); 237 223 if (got_fw_rev) 238 224 sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor); 239 225 else ··· 243 227 /* Get switch settings */ 244 228 option_switches = pcipcwd_get_option_switches(); 245 229 246 - printk(KERN_INFO PFX "Found card at port 0x%04x (Firmware: %s) %s temp option\n", 230 + printk(KERN_INFO PFX "Found card at port " 231 + "0x%04x (Firmware: %s) %s temp option\n", 247 232 (int) pcipcwd_private.io_addr, fw_ver_str, 248 233 (pcipcwd_private.supports_temp ? "with" : "without")); 249 234 250 - printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", 235 + printk(KERN_INFO PFX "Option switches (0x%02x): " 236 + "Temperature Reset Enable=%s, Power On Delay=%s\n", 251 237 option_switches, 252 238 ((option_switches & 0x10) ? "ON" : "OFF"), 253 239 ((option_switches & 0x08) ? "ON" : "OFF")); 254 240 255 241 if (pcipcwd_private.boot_status & WDIOF_CARDRESET) 256 - printk(KERN_INFO PFX "Previous reset was caused by the Watchdog card\n"); 242 + printk(KERN_INFO PFX 243 + "Previous reset was caused by the Watchdog card\n"); 257 244 258 245 if (pcipcwd_private.boot_status & WDIOF_OVERHEAT) 259 246 printk(KERN_INFO PFX "Card sensed a CPU Overheat\n"); 260 247 261 248 if (pcipcwd_private.boot_status == 0) 262 - printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); 249 + printk(KERN_INFO PFX 250 + "No previous trip detected - Cold boot or reset\n"); 263 251 } 264 252 265 253 static int pcipcwd_start(void) ··· 303 283 spin_unlock(&pcipcwd_private.io_lock); 304 284 305 285 if (!(stat_reg & WD_PCI_WDIS)) { 306 - printk(KERN_ERR PFX "Card did not acknowledge disable attempt\n"); 286 + printk(KERN_ERR PFX 287 + "Card did not acknowledge disable attempt\n"); 307 288 return -1; 308 289 } 309 290 ··· 385 364 } 386 365 387 366 /* clear trip status & LED and keep mode of relay 2 */ 388 - outb_p((control_status & WD_PCI_R2DS) | WD_PCI_WTRP, pcipcwd_private.io_addr + 1); 367 + outb_p((control_status & WD_PCI_R2DS) | WD_PCI_WTRP, 368 + pcipcwd_private.io_addr + 1); 389 369 390 370 /* clear reset counter */ 391 371 msb = 0; ··· 459 437 * five months ago... */ 460 438 expect_release = 0; 461 439 462 - /* scan to see whether or not we got the magic character */ 440 + /* scan to see whether or not we got the 441 + * magic character */ 463 442 for (i = 0; i != len; i++) { 464 443 char c; 465 444 if (get_user(c, data + i)) ··· 554 531 return -EFAULT; 555 532 556 533 if (pcipcwd_set_heartbeat(new_heartbeat)) 557 - return -EINVAL; 534 + return -EINVAL; 558 535 559 536 pcipcwd_keepalive(); 560 537 /* Fall */ ··· 583 560 /* /dev/watchdog can only be opened once */ 584 561 if (test_and_set_bit(0, &is_active)) { 585 562 if (debug >= VERBOSE) 586 - printk(KERN_ERR PFX "Attempt to open already opened device.\n"); 563 + printk(KERN_ERR PFX 564 + "Attempt to open already opened device.\n"); 587 565 return -EBUSY; 588 566 } 589 567 ··· 602 578 if (expect_release == 42) { 603 579 pcipcwd_stop(); 604 580 } else { 605 - printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n"); 581 + printk(KERN_CRIT PFX 582 + "Unexpected close, not stopping watchdog!\n"); 606 583 pcipcwd_keepalive(); 607 584 } 608 585 expect_release = 0; ··· 646 621 * Notify system 647 622 */ 648 623 649 - static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused) 624 + static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, 625 + void *unused) 650 626 { 651 627 if (code == SYS_DOWN || code == SYS_HALT) 652 628 pcipcwd_stop(); /* Turn the WDT off */ ··· 748 722 749 723 /* If heartbeat = 0 then we use the heartbeat from the dip-switches */ 750 724 if (heartbeat == 0) 751 - heartbeat = heartbeat_tbl[(pcipcwd_get_option_switches() & 0x07)]; 725 + heartbeat = 726 + heartbeat_tbl[(pcipcwd_get_option_switches() & 0x07)]; 752 727 753 - /* Check that the heartbeat value is within it's range ; if not reset to the default */ 728 + /* Check that the heartbeat value is within it's range ; 729 + * if not reset to the default */ 754 730 if (pcipcwd_set_heartbeat(heartbeat)) { 755 731 pcipcwd_set_heartbeat(WATCHDOG_HEARTBEAT); 756 - printk(KERN_INFO PFX "heartbeat value must be 0<heartbeat<65536, using %d\n", 732 + printk(KERN_INFO PFX 733 + "heartbeat value must be 0<heartbeat<65536, using %d\n", 757 734 WATCHDOG_HEARTBEAT); 758 735 } 759 736 760 737 ret = register_reboot_notifier(&pcipcwd_notifier); 761 738 if (ret != 0) { 762 - printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", 763 - ret); 739 + printk(KERN_ERR PFX 740 + "cannot register reboot notifier (err=%d)\n", ret); 764 741 goto err_out_release_region; 765 742 } 766 743 767 744 if (pcipcwd_private.supports_temp) { 768 745 ret = misc_register(&pcipcwd_temp_miscdev); 769 746 if (ret != 0) { 770 - printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 771 - TEMP_MINOR, ret); 747 + printk(KERN_ERR PFX "cannot register miscdev on " 748 + "minor=%d (err=%d)\n", TEMP_MINOR, ret); 772 749 goto err_out_unregister_reboot; 773 750 } 774 751 } 775 752 776 753 ret = misc_register(&pcipcwd_miscdev); 777 754 if (ret != 0) { 778 - printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 755 + printk(KERN_ERR PFX 756 + "cannot register miscdev on minor=%d (err=%d)\n", 779 757 WATCHDOG_MINOR, ret); 780 758 goto err_out_misc_deregister; 781 759 }
+104 -59
drivers/watchdog/pcwd_usb.c
··· 51 51 52 52 /* Use our own dbg macro */ 53 53 #undef dbg 54 - #define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG PFX format "\n" , ## arg); } while (0) 55 - 54 + #define dbg(format, arg...) \ 55 + do { if (debug) printk(KERN_DEBUG PFX format "\n" , ## arg); } while (0) 56 56 57 57 /* Module and Version Information */ 58 58 #define DRIVER_VERSION "1.02" 59 - #define DRIVER_DATE "21 Jan 2007" 60 59 #define DRIVER_AUTHOR "Wim Van Sebroeck <wim@iguana.be>" 61 60 #define DRIVER_DESC "Berkshire USB-PC Watchdog driver" 62 61 #define DRIVER_LICENSE "GPL" ··· 72 73 module_param(debug, int, 0); 73 74 MODULE_PARM_DESC(debug, "Debug enabled or not"); 74 75 75 - #define WATCHDOG_HEARTBEAT 0 /* default heartbeat = delay-time from dip-switches */ 76 + #define WATCHDOG_HEARTBEAT 0 /* default heartbeat = 77 + delay-time from dip-switches */ 76 78 static int heartbeat = WATCHDOG_HEARTBEAT; 77 79 module_param(heartbeat, int, 0); 78 - MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 80 + MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. " 81 + "(0<heartbeat<65536 or 0=delay-time from dip-switches, default=" 82 + __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 79 83 80 84 static int nowayout = WATCHDOG_NOWAYOUT; 81 85 module_param(nowayout, int, 0); 82 - MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 86 + MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 87 + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 83 88 84 89 /* The vendor and product id's for the USB-PC Watchdog card */ 85 90 #define USB_PCWD_VENDOR_ID 0x0c98 ··· 94 91 { USB_DEVICE(USB_PCWD_VENDOR_ID, USB_PCWD_PRODUCT_ID) }, 95 92 { } /* Terminating entry */ 96 93 }; 97 - MODULE_DEVICE_TABLE (usb, usb_pcwd_table); 94 + MODULE_DEVICE_TABLE(usb, usb_pcwd_table); 98 95 99 96 /* according to documentation max. time to process a command for the USB 100 97 * watchdog card is 100 or 200 ms, so we give it 250 ms to do it's job */ 101 98 #define USB_COMMAND_TIMEOUT 250 102 99 103 100 /* Watchdog's internal commands */ 104 - #define CMD_READ_TEMP 0x02 /* Read Temperature; Re-trigger Watchdog */ 101 + #define CMD_READ_TEMP 0x02 /* Read Temperature; 102 + Re-trigger Watchdog */ 105 103 #define CMD_TRIGGER CMD_READ_TEMP 106 104 #define CMD_GET_STATUS 0x04 /* Get Status Information */ 107 105 #define CMD_GET_FIRMWARE_VERSION 0x08 /* Get Firmware Version */ 108 106 #define CMD_GET_DIP_SWITCH_SETTINGS 0x0c /* Get Dip Switch Settings */ 109 107 #define CMD_READ_WATCHDOG_TIMEOUT 0x18 /* Read Current Watchdog Time */ 110 - #define CMD_WRITE_WATCHDOG_TIMEOUT 0x19 /* Write Current Watchdog Time */ 108 + #define CMD_WRITE_WATCHDOG_TIMEOUT 0x19 /* Write Current WatchdogTime */ 111 109 #define CMD_ENABLE_WATCHDOG 0x30 /* Enable / Disable Watchdog */ 112 110 #define CMD_DISABLE_WATCHDOG CMD_ENABLE_WATCHDOG 113 111 ··· 133 129 134 130 /* Structure to hold all of our device specific stuff */ 135 131 struct usb_pcwd_private { 136 - struct usb_device *udev; /* save off the usb device pointer */ 137 - struct usb_interface *interface; /* the interface for this device */ 132 + /* save off the usb device pointer */ 133 + struct usb_device *udev; 134 + /* the interface for this device */ 135 + struct usb_interface *interface; 138 136 139 - unsigned int interface_number; /* the interface number used for cmd's */ 137 + /* the interface number used for cmd's */ 138 + unsigned int interface_number; 140 139 141 - unsigned char *intr_buffer; /* the buffer to intr data */ 142 - dma_addr_t intr_dma; /* the dma address for the intr buffer */ 143 - size_t intr_size; /* the size of the intr buffer */ 144 - struct urb *intr_urb; /* the urb used for the intr pipe */ 140 + /* the buffer to intr data */ 141 + unsigned char *intr_buffer; 142 + /* the dma address for the intr buffer */ 143 + dma_addr_t intr_dma; 144 + /* the size of the intr buffer */ 145 + size_t intr_size; 146 + /* the urb used for the intr pipe */ 147 + struct urb *intr_urb; 145 148 146 - unsigned char cmd_command; /* The command that is reported back */ 147 - unsigned char cmd_data_msb; /* The data MSB that is reported back */ 148 - unsigned char cmd_data_lsb; /* The data LSB that is reported back */ 149 - atomic_t cmd_received; /* true if we received a report after a command */ 149 + /* The command that is reported back */ 150 + unsigned char cmd_command; 151 + /* The data MSB that is reported back */ 152 + unsigned char cmd_data_msb; 153 + /* The data LSB that is reported back */ 154 + unsigned char cmd_data_lsb; 155 + /* true if we received a report after a command */ 156 + atomic_t cmd_received; 150 157 151 - int exists; /* Wether or not the device exists */ 152 - struct mutex mtx; /* locks this structure */ 158 + /* Wether or not the device exists */ 159 + int exists; 160 + /* locks this structure */ 161 + struct mutex mtx; 153 162 }; 154 163 static struct usb_pcwd_private *usb_pcwd_device; 155 164 ··· 170 153 static DEFINE_MUTEX(disconnect_mutex); 171 154 172 155 /* local function prototypes */ 173 - static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_device_id *id); 156 + static int usb_pcwd_probe(struct usb_interface *interface, 157 + const struct usb_device_id *id); 174 158 static void usb_pcwd_disconnect(struct usb_interface *interface); 175 159 176 160 /* usb specific object needed to register this driver with the usb subsystem */ ··· 185 167 186 168 static void usb_pcwd_intr_done(struct urb *urb) 187 169 { 188 - struct usb_pcwd_private *usb_pcwd = (struct usb_pcwd_private *)urb->context; 170 + struct usb_pcwd_private *usb_pcwd = 171 + (struct usb_pcwd_private *)urb->context; 189 172 unsigned char *data = usb_pcwd->intr_buffer; 190 173 int retval; 191 174 ··· 197 178 case -ENOENT: 198 179 case -ESHUTDOWN: 199 180 /* this urb is terminated, clean up */ 200 - dbg("%s - urb shutting down with status: %d", __func__, urb->status); 181 + dbg("%s - urb shutting down with status: %d", __func__, 182 + urb->status); 201 183 return; 202 184 /* -EPIPE: should clear the halt */ 203 185 default: /* error */ 204 - dbg("%s - nonzero urb status received: %d", __func__, urb->status); 186 + dbg("%s - nonzero urb status received: %d", __func__, 187 + urb->status); 205 188 goto resubmit; 206 189 } 207 190 ··· 220 199 resubmit: 221 200 retval = usb_submit_urb(urb, GFP_ATOMIC); 222 201 if (retval) 223 - printk(KERN_ERR PFX "can't resubmit intr, usb_submit_urb failed with result %d\n", 224 - retval); 202 + printk(KERN_ERR PFX "can't resubmit intr, " 203 + "usb_submit_urb failed with result %d\n", retval); 225 204 } 226 205 227 - static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd, unsigned char cmd, 228 - unsigned char *msb, unsigned char *lsb) 206 + static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd, 207 + unsigned char cmd, unsigned char *msb, unsigned char *lsb) 229 208 { 230 209 int got_response, count; 231 210 unsigned char buf[6]; 232 211 233 - /* We will not send any commands if the USB PCWD device does not exist */ 212 + /* We will not send any commands if the USB PCWD device does 213 + * not exist */ 234 214 if ((!usb_pcwd) || (!usb_pcwd->exists)) 235 215 return -1; 236 216 237 - /* The USB PC Watchdog uses a 6 byte report format. The board currently uses 238 - * only 3 of the six bytes of the report. */ 217 + /* The USB PC Watchdog uses a 6 byte report format. 218 + * The board currently uses only 3 of the six bytes of the report. */ 239 219 buf[0] = cmd; /* Byte 0 = CMD */ 240 220 buf[1] = *msb; /* Byte 1 = Data MSB */ 241 221 buf[2] = *lsb; /* Byte 2 = Data LSB */ ··· 251 229 HID_REQ_SET_REPORT, HID_DT_REPORT, 252 230 0x0200, usb_pcwd->interface_number, buf, sizeof(buf), 253 231 USB_COMMAND_TIMEOUT) != sizeof(buf)) { 254 - dbg("usb_pcwd_send_command: error in usb_control_msg for cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb); 232 + dbg("usb_pcwd_send_command: error in usb_control_msg for " 233 + "cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb); 255 234 } 256 235 /* wait till the usb card processed the command, 257 236 * with a max. timeout of USB_COMMAND_TIMEOUT */ 258 237 got_response = 0; 259 - for (count = 0; (count < USB_COMMAND_TIMEOUT) && (!got_response); count++) { 238 + for (count = 0; (count < USB_COMMAND_TIMEOUT) && (!got_response); 239 + count++) { 260 240 mdelay(1); 261 241 if (atomic_read(&usb_pcwd->cmd_received)) 262 242 got_response = 1; ··· 280 256 int retval; 281 257 282 258 /* Enable Watchdog */ 283 - retval = usb_pcwd_send_command(usb_pcwd, CMD_ENABLE_WATCHDOG, &msb, &lsb); 259 + retval = usb_pcwd_send_command(usb_pcwd, CMD_ENABLE_WATCHDOG, 260 + &msb, &lsb); 284 261 285 262 if ((retval == 0) || (lsb == 0)) { 286 - printk(KERN_ERR PFX "Card did not acknowledge enable attempt\n"); 263 + printk(KERN_ERR PFX 264 + "Card did not acknowledge enable attempt\n"); 287 265 return -1; 288 266 } 289 267 ··· 299 273 int retval; 300 274 301 275 /* Disable Watchdog */ 302 - retval = usb_pcwd_send_command(usb_pcwd, CMD_DISABLE_WATCHDOG, &msb, &lsb); 276 + retval = usb_pcwd_send_command(usb_pcwd, CMD_DISABLE_WATCHDOG, 277 + &msb, &lsb); 303 278 304 279 if ((retval == 0) || (lsb != 0)) { 305 - printk(KERN_ERR PFX "Card did not acknowledge disable attempt\n"); 280 + printk(KERN_ERR PFX 281 + "Card did not acknowledge disable attempt\n"); 306 282 return -1; 307 283 } 308 284 ··· 336 308 return 0; 337 309 } 338 310 339 - static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd, int *temperature) 311 + static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd, 312 + int *temperature) 340 313 { 341 314 unsigned char msb, lsb; 342 315 ··· 352 323 return 0; 353 324 } 354 325 355 - static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd, int *time_left) 326 + static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd, 327 + int *time_left) 356 328 { 357 329 unsigned char msb, lsb; 358 330 ··· 371 341 */ 372 342 373 343 static ssize_t usb_pcwd_write(struct file *file, const char __user *data, 374 - size_t len, loff_t *ppos) 344 + size_t len, loff_t *ppos) 375 345 { 376 346 /* See if we got the magic character 'V' and reload the timer */ 377 347 if (len) { ··· 382 352 * five months ago... */ 383 353 expect_release = 0; 384 354 385 - /* scan to see whether or not we got the magic character */ 355 + /* scan to see whether or not we got the 356 + * magic character */ 386 357 for (i = 0; i != len; i++) { 387 358 char c; 388 359 if (get_user(c, data + i)) ··· 462 431 return -EFAULT; 463 432 464 433 if (usb_pcwd_set_heartbeat(usb_pcwd_device, new_heartbeat)) 465 - return -EINVAL; 434 + return -EINVAL; 466 435 467 436 usb_pcwd_keepalive(usb_pcwd_device); 468 437 /* Fall */ ··· 506 475 if (expect_release == 42) { 507 476 usb_pcwd_stop(usb_pcwd_device); 508 477 } else { 509 - printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n"); 478 + printk(KERN_CRIT PFX 479 + "Unexpected close, not stopping watchdog!\n"); 510 480 usb_pcwd_keepalive(usb_pcwd_device); 511 481 } 512 482 expect_release = 0; ··· 547 515 * Notify system 548 516 */ 549 517 550 - static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused) 518 + static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code, 519 + void *unused) 551 520 { 552 521 if (code == SYS_DOWN || code == SYS_HALT) 553 522 usb_pcwd_stop(usb_pcwd_device); /* Turn the WDT off */ ··· 611 578 * Called by the usb core when a new device is connected that it thinks 612 579 * this driver might be interested in. 613 580 */ 614 - static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_device_id *id) 581 + static int usb_pcwd_probe(struct usb_interface *interface, 582 + const struct usb_device_id *id) 615 583 { 616 584 struct usb_device *udev = interface_to_usbdev(interface); 617 585 struct usb_host_interface *iface_desc; ··· 636 602 637 603 /* check out that we have a HID device */ 638 604 if (!(iface_desc->desc.bInterfaceClass == USB_CLASS_HID)) { 639 - printk(KERN_ERR PFX "The device isn't a Human Interface Device\n"); 605 + printk(KERN_ERR PFX 606 + "The device isn't a Human Interface Device\n"); 640 607 return -ENODEV; 641 608 } 642 609 ··· 667 632 usb_pcwd->udev = udev; 668 633 usb_pcwd->interface = interface; 669 634 usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber; 670 - usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ? le16_to_cpu(endpoint->wMaxPacketSize) : 8); 635 + usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ? 636 + le16_to_cpu(endpoint->wMaxPacketSize) : 8); 671 637 672 638 /* set up the memory buffer's */ 673 - usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, GFP_ATOMIC, &usb_pcwd->intr_dma); 639 + usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, 640 + GFP_ATOMIC, &usb_pcwd->intr_dma); 674 641 if (!usb_pcwd->intr_buffer) { 675 642 printk(KERN_ERR PFX "Out of memory\n"); 676 643 goto error; ··· 706 669 usb_pcwd_stop(usb_pcwd); 707 670 708 671 /* Get the Firmware Version */ 709 - got_fw_rev = usb_pcwd_send_command(usb_pcwd, CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor); 672 + got_fw_rev = usb_pcwd_send_command(usb_pcwd, CMD_GET_FIRMWARE_VERSION, 673 + &fw_rev_major, &fw_rev_minor); 710 674 if (got_fw_rev) 711 675 sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor); 712 676 else ··· 717 679 fw_ver_str); 718 680 719 681 /* Get switch settings */ 720 - usb_pcwd_send_command(usb_pcwd, CMD_GET_DIP_SWITCH_SETTINGS, &dummy, &option_switches); 682 + usb_pcwd_send_command(usb_pcwd, CMD_GET_DIP_SWITCH_SETTINGS, &dummy, 683 + &option_switches); 721 684 722 - printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", 685 + printk(KERN_INFO PFX "Option switches (0x%02x): " 686 + "Temperature Reset Enable=%s, Power On Delay=%s\n", 723 687 option_switches, 724 688 ((option_switches & 0x10) ? "ON" : "OFF"), 725 689 ((option_switches & 0x08) ? "ON" : "OFF")); ··· 730 690 if (heartbeat == 0) 731 691 heartbeat = heartbeat_tbl[(option_switches & 0x07)]; 732 692 733 - /* Check that the heartbeat value is within it's range ; if not reset to the default */ 693 + /* Check that the heartbeat value is within it's range ; 694 + * if not reset to the default */ 734 695 if (usb_pcwd_set_heartbeat(usb_pcwd, heartbeat)) { 735 696 usb_pcwd_set_heartbeat(usb_pcwd, WATCHDOG_HEARTBEAT); 736 - printk(KERN_INFO PFX "heartbeat value must be 0<heartbeat<65536, using %d\n", 697 + printk(KERN_INFO PFX 698 + "heartbeat value must be 0<heartbeat<65536, using %d\n", 737 699 WATCHDOG_HEARTBEAT); 738 700 } 739 701 740 702 retval = register_reboot_notifier(&usb_pcwd_notifier); 741 703 if (retval != 0) { 742 - printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", 704 + printk(KERN_ERR PFX 705 + "cannot register reboot notifier (err=%d)\n", 743 706 retval); 744 707 goto error; 745 708 } 746 709 747 710 retval = misc_register(&usb_pcwd_temperature_miscdev); 748 711 if (retval != 0) { 749 - printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 712 + printk(KERN_ERR PFX 713 + "cannot register miscdev on minor=%d (err=%d)\n", 750 714 TEMP_MINOR, retval); 751 715 goto err_out_unregister_reboot; 752 716 } 753 717 754 718 retval = misc_register(&usb_pcwd_miscdev); 755 719 if (retval != 0) { 756 - printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 720 + printk(KERN_ERR PFX 721 + "cannot register miscdev on minor=%d (err=%d)\n", 757 722 WATCHDOG_MINOR, retval); 758 723 goto err_out_misc_deregister; 759 724 } ··· 844 799 return result; 845 800 } 846 801 847 - printk(KERN_INFO PFX DRIVER_DESC " v" DRIVER_VERSION " (" DRIVER_DATE ")\n"); 802 + printk(KERN_INFO PFX DRIVER_DESC " v" DRIVER_VERSION "\n"); 848 803 return 0; 849 804 } 850 805
+9 -9
drivers/watchdog/pnx4008_wdt.c
··· 54 54 55 55 /* WDTIM_CTRL bit definitions */ 56 56 #define COUNT_ENAB 1 57 - #define RESET_COUNT (1<<1) 58 - #define DEBUG_EN (1<<2) 57 + #define RESET_COUNT (1 << 1) 58 + #define DEBUG_EN (1 << 2) 59 59 60 60 /* WDTIM_MCTRL bit definitions */ 61 61 #define MR0_INT 1 62 62 #undef RESET_COUNT0 63 - #define RESET_COUNT0 (1<<2) 64 - #define STOP_COUNT0 (1<<2) 65 - #define M_RES1 (1<<3) 66 - #define M_RES2 (1<<4) 67 - #define RESFRC1 (1<<5) 68 - #define RESFRC2 (1<<6) 63 + #define RESET_COUNT0 (1 << 2) 64 + #define STOP_COUNT0 (1 << 2) 65 + #define M_RES1 (1 << 3) 66 + #define M_RES2 (1 << 4) 67 + #define RESFRC1 (1 << 5) 68 + #define RESFRC2 (1 << 6) 69 69 70 70 /* WDTIM_EMR bit definitions */ 71 71 #define EXT_MATCH0 1 72 - #define MATCH_OUTPUT_HIGH (2<<4) /*a MATCH_CTRL setting */ 72 + #define MATCH_OUTPUT_HIGH (2 << 4) /*a MATCH_CTRL setting */ 73 73 74 74 /* WDTIM_RES bit definitions */ 75 75 #define WDOG_RESET 1 /* read only */
+2 -1
drivers/watchdog/riowd.c
··· 146 146 return 0; 147 147 } 148 148 149 - static ssize_t riowd_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) 149 + static ssize_t riowd_write(struct file *file, const char __user *buf, 150 + size_t count, loff_t *ppos) 150 151 { 151 152 struct riowd *p = riowd_device; 152 153
+3 -3
drivers/watchdog/sa1100_wdt.c
··· 1 1 /* 2 2 * Watchdog driver for the SA11x0/PXA2xx 3 3 * 4 - * (c) Copyright 2000 Oleg Drokin <green@crimea.edu> 5 - * Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk> 4 + * (c) Copyright 2000 Oleg Drokin <green@crimea.edu> 5 + * Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk> 6 6 * 7 7 * This program is free software; you can redistribute it and/or 8 8 * modify it under the terms of the GNU General Public License ··· 15 15 * 16 16 * (c) Copyright 2000 Oleg Drokin <green@crimea.edu> 17 17 * 18 - * 27/11/2000 Initial release 18 + * 27/11/2000 Initial release 19 19 */ 20 20 #include <linux/module.h> 21 21 #include <linux/moduleparam.h>
+1 -1
drivers/watchdog/sbc60xxwdt.c
··· 1 1 /* 2 2 * 60xx Single Board Computer Watchdog Timer driver for Linux 2.2.x 3 3 * 4 - * Based on acquirewdt.c by Alan Cox. 4 + * Based on acquirewdt.c by Alan Cox. 5 5 * 6 6 * This program is free software; you can redistribute it and/or 7 7 * modify it under the terms of the GNU General Public License
+6 -6
drivers/watchdog/sbc8360.c
··· 4 4 * (c) Copyright 2005 Webcon, Inc. 5 5 * 6 6 * Based on ib700wdt.c, which is based on advantechwdt.c which is based 7 - * on acquirewdt.c which is based on wdt.c. 7 + * on acquirewdt.c which is based on wdt.c. 8 8 * 9 9 * (c) Copyright 2001 Charles Howes <chowes@vsol.net> 10 10 * 11 - * Based on advantechwdt.c which is based on acquirewdt.c which 12 - * is based on wdt.c. 11 + * Based on advantechwdt.c which is based on acquirewdt.c which 12 + * is based on wdt.c. 13 13 * 14 14 * (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl> 15 15 * ··· 30 30 * 31 31 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> 32 32 * 33 - * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com> 34 - * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT 35 - * Added timeout module option to override default 33 + * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com> 34 + * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT 35 + * Added timeout module option to override default 36 36 * 37 37 */ 38 38
+2 -1
drivers/watchdog/sbc_epx_c3.c
··· 35 35 36 36 static int nowayout = WATCHDOG_NOWAYOUT; 37 37 module_param(nowayout, int, 0); 38 - MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 38 + MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 39 + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 39 40 40 41 #define EPXC3_WATCHDOG_CTL_REG 0x1ee /* write 1 to enable, 0 to disable */ 41 42 #define EPXC3_WATCHDOG_PET_REG 0x1ef /* write anything to pet once enabled */
+4 -3
drivers/watchdog/sc1200wdt.c
··· 71 71 #define UART2_IRQ 0x04 /* Serial1 */ 72 72 /* 5 -7 are reserved */ 73 73 74 - static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER; 74 + static char banner[] __initdata = PFX SC1200_MODULE_VER; 75 75 static int timeout = 1; 76 76 static int io = -1; 77 77 static int io_len = 2; /* for non plug and play */ ··· 392 392 { 393 393 int ret; 394 394 395 - printk("%s\n", banner); 395 + printk(KERN_INFO "%s\n", banner); 396 396 397 397 #if defined CONFIG_PNP 398 398 if (isapnp) { ··· 477 477 module_exit(sc1200wdt_exit); 478 478 479 479 MODULE_AUTHOR("Zwane Mwaikambo <zwane@commfireservices.com>"); 480 - MODULE_DESCRIPTION("Driver for National Semiconductor PC87307/PC97307 watchdog component"); 480 + MODULE_DESCRIPTION( 481 + "Driver for National Semiconductor PC87307/PC97307 watchdog component"); 481 482 MODULE_LICENSE("GPL"); 482 483 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+5 -4
drivers/watchdog/sc520_wdt.c
··· 1 1 /* 2 2 * AMD Elan SC520 processor Watchdog Timer driver 3 3 * 4 - * Based on acquirewdt.c by Alan Cox, 5 - * and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net> 4 + * Based on acquirewdt.c by Alan Cox, 5 + * and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net> 6 6 * 7 7 * This program is free software; you can redistribute it and/or 8 8 * modify it under the terms of the GNU General Public License ··· 11 11 * 12 12 * The authors do NOT admit liability nor provide warranty for 13 13 * any of this software. This material is provided "AS-IS" in 14 - * the hope that it may be useful for others. 14 + * the hope that it may be useful for others. 15 15 * 16 16 * (c) Copyright 2001 Scott Jennings <linuxdrivers@oro.net> 17 17 * 9/27 - 2001 [Initial release] ··· 438 438 module_exit(sc520_wdt_unload); 439 439 440 440 MODULE_AUTHOR("Scott and Bill Jennings"); 441 - MODULE_DESCRIPTION("Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor"); 441 + MODULE_DESCRIPTION( 442 + "Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor"); 442 443 MODULE_LICENSE("GPL"); 443 444 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+15 -15
drivers/watchdog/smsc37b787_wdt.c
··· 2 2 * SMsC 37B787 Watchdog Timer driver for Linux 2.6.x.x 3 3 * 4 4 * Based on acquirewdt.c by Alan Cox <alan@lxorguk.ukuu.org.uk> 5 - * and some other existing drivers 5 + * and some other existing drivers 6 6 * 7 7 * This program is free software; you can redistribute it and/or 8 8 * modify it under the terms of the GNU General Public License ··· 11 11 * 12 12 * The authors do NOT admit liability nor provide warranty for 13 13 * any of this software. This material is provided "AS-IS" in 14 - * the hope that it may be useful for others. 14 + * the hope that it may be useful for others. 15 15 * 16 16 * (C) Copyright 2003-2006 Sven Anders <anders@anduras.de> 17 17 * ··· 22 22 * 23 23 * Theory of operation: 24 24 * 25 - * A Watchdog Timer (WDT) is a hardware circuit that can 26 - * reset the computer system in case of a software fault. 27 - * You probably knew that already. 25 + * A Watchdog Timer (WDT) is a hardware circuit that can 26 + * reset the computer system in case of a software fault. 27 + * You probably knew that already. 28 28 * 29 - * Usually a userspace daemon will notify the kernel WDT driver 30 - * via the /dev/watchdog special device file that userspace is 31 - * still alive, at regular intervals. When such a notification 32 - * occurs, the driver will usually tell the hardware watchdog 33 - * that everything is in order, and that the watchdog should wait 34 - * for yet another little while to reset the system. 35 - * If userspace fails (RAM error, kernel bug, whatever), the 36 - * notifications cease to occur, and the hardware watchdog will 37 - * reset the system (causing a reboot) after the timeout occurs. 29 + * Usually a userspace daemon will notify the kernel WDT driver 30 + * via the /dev/watchdog special device file that userspace is 31 + * still alive, at regular intervals. When such a notification 32 + * occurs, the driver will usually tell the hardware watchdog 33 + * that everything is in order, and that the watchdog should wait 34 + * for yet another little while to reset the system. 35 + * If userspace fails (RAM error, kernel bug, whatever), the 36 + * notifications cease to occur, and the hardware watchdog will 37 + * reset the system (causing a reboot) after the timeout occurs. 38 38 * 39 39 * Create device with: 40 40 * mknod /dev/watchdog c 10 130 ··· 485 485 case WDIOC_GETTIMEOUT: 486 486 new_timeout = timeout; 487 487 if (unit == UNIT_MINUTE) 488 - new_timeout *= 60; 488 + new_timeout *= 60; 489 489 return put_user(new_timeout, uarg.i); 490 490 default: 491 491 return -ENOTTY;
+3 -2
drivers/watchdog/softdog.c
··· 1 1 /* 2 2 * SoftDog 0.07: A Software Watchdog Device 3 3 * 4 - * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, All Rights Reserved. 4 + * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, 5 + * All Rights Reserved. 5 6 * 6 7 * This program is free software; you can redistribute it and/or 7 8 * modify it under the terms of the GNU General Public License ··· 33 32 * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT. 34 33 * 35 34 * 20020530 Joel Becker <joel.becker@oracle.com> 36 - * Added Matt Domsch's nowayout module option. 35 + * Added Matt Domsch's nowayout module option. 37 36 */ 38 37 39 38 #include <linux/module.h>
+2 -1
drivers/watchdog/w83697hf_wdt.c
··· 462 462 module_exit(wdt_exit); 463 463 464 464 MODULE_LICENSE("GPL"); 465 - MODULE_AUTHOR("Marcus Junker <junker@anduras.de>, Samuel Tardieu <sam@rfc1149.net>"); 465 + MODULE_AUTHOR("Marcus Junker <junker@anduras.de>, " 466 + "Samuel Tardieu <sam@rfc1149.net>"); 466 467 MODULE_DESCRIPTION("w83697hf/hg WDT driver"); 467 468 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+1 -1
drivers/watchdog/w83697ug_wdt.c
··· 2 2 * w83697ug/uf WDT driver 3 3 * 4 4 * (c) Copyright 2008 Flemming Fransen <ff@nrvissing.net> 5 - * reused original code to supoprt w83697ug/uf. 5 + * reused original code to support w83697ug/uf. 6 6 * 7 7 * Based on w83627hf_wdt.c which is based on advantechwdt.c 8 8 * which is based on wdt.c.
+1 -1
drivers/watchdog/w83977f_wdt.c
··· 426 426 return -EFAULT; 427 427 428 428 if (wdt_set_timeout(new_timeout)) 429 - return -EINVAL; 429 + return -EINVAL; 430 430 431 431 wdt_keepalive(); 432 432 /* Fall */
+12 -12
drivers/watchdog/wd501p.h
··· 11 11 * 12 12 * http://www.cymru.net 13 13 * 14 - * This driver is provided under the GNU General Public License, incorporated 15 - * herein by reference. The driver is provided without warranty or 16 - * support. 14 + * This driver is provided under the GNU General Public License, 15 + * incorporated herein by reference. The driver is provided without 16 + * warranty or support. 17 17 * 18 18 * Release 0.04. 19 19 * ··· 39 39 /* programmable outputs: */ 40 40 #define WDT_PROGOUT (io+15) /* wr=enable, rd=disable */ 41 41 42 - /* FAN 501 500 */ 43 - #define WDC_SR_WCCR 1 /* Active low */ /* X X X */ 44 - #define WDC_SR_TGOOD 2 /* X X - */ 45 - #define WDC_SR_ISOI0 4 /* X X X */ 46 - #define WDC_SR_ISII1 8 /* X X X */ 47 - #define WDC_SR_FANGOOD 16 /* X - - */ 48 - #define WDC_SR_PSUOVER 32 /* Active low */ /* X X - */ 49 - #define WDC_SR_PSUUNDR 64 /* Active low */ /* X X - */ 50 - #define WDC_SR_IRQ 128 /* Active low */ /* X X X */ 42 + /* FAN 501 500 */ 43 + #define WDC_SR_WCCR 1 /* Active low */ /* X X X */ 44 + #define WDC_SR_TGOOD 2 /* X X - */ 45 + #define WDC_SR_ISOI0 4 /* X X X */ 46 + #define WDC_SR_ISII1 8 /* X X X */ 47 + #define WDC_SR_FANGOOD 16 /* X - - */ 48 + #define WDC_SR_PSUOVER 32 /* Active low */ /* X X - */ 49 + #define WDC_SR_PSUUNDR 64 /* Active low */ /* X X - */ 50 + #define WDC_SR_IRQ 128 /* Active low */ /* X X X */ 51 51
+1 -1
drivers/watchdog/wdt977.c
··· 401 401 return -EFAULT; 402 402 403 403 if (wdt977_set_timeout(new_timeout)) 404 - return -EINVAL; 404 + return -EINVAL; 405 405 406 406 wdt977_keepalive(); 407 407 /* Fall */