···11/*22 * Acquire Single Board Computer Watchdog Timer driver33 *44- * Based on wdt.c. Original copyright messages:44+ * Based on wdt.c. Original copyright messages:55 *66 * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,77 * All Rights Reserved.···1717 *1818 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>1919 *2020- * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>2121- * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT2222- * Can't add timeout - driver doesn't allow changing value2020+ * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>2121+ * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT2222+ * Can't add timeout - driver doesn't allow changing value2323 */24242525/*
+5-2
drivers/watchdog/advantechwdt.c
···138138 void __user *argp = (void __user *)arg;139139 int __user *p = argp;140140 static struct watchdog_info ident = {141141- .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,141141+ .options = WDIOF_KEEPALIVEPING |142142+ WDIOF_SETTIMEOUT |143143+ WDIOF_MAGICCLOSE,142144 .firmware_version = 1,143145 .identity = WATCHDOG_NAME,144146 };···261259 goto unreg_stop;262260 }263261264264- /* Check that the heartbeat value is within it's range ; if not reset to the default */262262+ /* Check that the heartbeat value is within it's range ;263263+ * if not reset to the default */265264 if (advwdt_set_heartbeat(timeout)) {266265 advwdt_set_heartbeat(WATCHDOG_TIMEOUT);267266 printk(KERN_INFO PFX
+10-10
drivers/watchdog/alim1535_wdt.c
···60606161 pci_read_config_dword(ali_pci, 0xCC, &val);6262 val &= ~0x3F; /* Mask count */6363- val |= (1<<25) | ali_timeout_bits;6363+ val |= (1 << 25) | ali_timeout_bits;6464 pci_write_config_dword(ali_pci, 0xCC, val);65656666 spin_unlock(&ali_lock);···7979 spin_lock(&ali_lock);80808181 pci_read_config_dword(ali_pci, 0xCC, &val);8282- val &= ~0x3F; /* Mask count to zero (disabled) */8383- val &= ~(1<<25);/* and for safety mask the reset enable */8282+ val &= ~0x3F; /* Mask count to zero (disabled) */8383+ val &= ~(1 << 25); /* and for safety mask the reset enable */8484 pci_write_config_dword(ali_pci, 0xCC, val);85858686 spin_unlock(&ali_lock);···8989/*9090 * ali_keepalive - send a keepalive to the watchdog9191 *9292- * Send a keepalive to the timer (actually we restart the timer).9292+ * Send a keepalive to the timer (actually we restart the timer).9393 */94949595static void ali_keepalive(void)···109109 if (t < 0)110110 return -EINVAL;111111 else if (t < 60)112112- ali_timeout_bits = t|(1<<6);112112+ ali_timeout_bits = t|(1 << 6);113113 else if (t < 3600)114114- ali_timeout_bits = (t/60)|(1<<7);114114+ ali_timeout_bits = (t / 60)|(1 << 7);115115 else if (t < 18000)116116- ali_timeout_bits = (t/300)|(1<<6)|(1<<7);116116+ ali_timeout_bits = (t / 300)|(1 << 6)|(1 << 7);117117 else118118 return -EINVAL;119119···138138 */139139140140static ssize_t ali_write(struct file *file, const char __user *data,141141- size_t len, loff_t *ppos)141141+ size_t len, loff_t *ppos)142142{143143 /* See if we got the magic character 'V' and reload the timer */144144 if (len) {···348348 /* Timer bits */349349 wdog &= ~0x3F;350350 /* Issued events */351351- wdog &= ~((1<<27)|(1<<26)|(1<<25)|(1<<24));351351+ wdog &= ~((1 << 27)|(1 << 26)|(1 << 25)|(1 << 24));352352 /* No monitor bits */353353- wdog &= ~((1<<16)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<9));353353+ wdog &= ~((1 << 16)|(1 << 13)|(1 << 12)|(1 << 11)|(1 << 10)|(1 << 9));354354355355 pci_write_config_dword(pdev, 0xCC, wdog);356356
+4-2
drivers/watchdog/alim7101_wdt.c
···355355 alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,356356 NULL);357357 if (!alim7101_pmu) {358358- printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n");358358+ printk(KERN_INFO PFX359359+ "ALi M7101 PMU not present - WDT not set\n");359360 return -EBUSY;360361 }361362···400399401400 rc = misc_register(&wdt_miscdev);402401 if (rc) {403403- printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",402402+ printk(KERN_ERR PFX403403+ "cannot register miscdev on minor=%d (err=%d)\n",404404 wdt_miscdev.minor, rc);405405 goto err_out_reboot;406406 }
+1-1
drivers/watchdog/at91sam9_wdt.c
···201201 * Pat the watchdog whenever device is written to.202202 */203203static ssize_t at91_wdt_write(struct file *file, const char *data, size_t len,204204- loff_t *ppos)204204+ loff_t *ppos)205205{206206 if (!len)207207 return 0;
+11-11
drivers/watchdog/eurotechwdt.c
···88 * Based on wdt.c.99 * Original copyright messages:1010 *1111- * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,1111+ * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,1212 * All Rights Reserved.1313 *1414- * This program is free software; you can redistribute it and/or1515- * modify it under the terms of the GNU General Public License1616- * as published by the Free Software Foundation; either version1717- * 2 of the License, or (at your option) any later version.1414+ * This program is free software; you can redistribute it and/or1515+ * modify it under the terms of the GNU General Public License1616+ * as published by the Free Software Foundation; either version1717+ * 2 of the License, or (at your option) any later version.1818 *1919- * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide2020- * warranty for any of this software. This material is provided2121- * "AS-IS" and at no charge.1919+ * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide2020+ * warranty for any of this software. This material is provided2121+ * "AS-IS" and at no charge.2222 *2323- * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>*2323+ * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>*2424 */25252626/* Changelog:···3737 * add expect_close support3838 *3939 * 2002.05.30 - Joel Becker <joel.becker@oracle.com>4040- * Added Matt Domsch's nowayout module option.4040+ * Added Matt Domsch's nowayout module option.4141 */42424343/*···151151 if (irq == 0)152152 printk(KERN_INFO ": interrupt disabled\n");153153154154- eurwdt_write_reg(WDT_TIMER_CFG, irq<<4);154154+ eurwdt_write_reg(WDT_TIMER_CFG, irq << 4);155155156156 eurwdt_write_reg(WDT_UNIT_SEL, WDT_UNIT_SECS); /* we use seconds */157157 eurwdt_set_timeout(0); /* the default timeout */
+8-3
drivers/watchdog/geodewdt.c
···34343535static int timeout = WATCHDOG_TIMEOUT;3636module_param(timeout, int, 0);3737-MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=131, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ".");3737+MODULE_PARM_DESC(timeout,3838+ "Watchdog timeout in seconds. 1<= timeout <=131, default="3939+ __MODULE_STRING(WATCHDOG_TIMEOUT) ".");38403941static int nowayout = WATCHDOG_NOWAYOUT;4042module_param(nowayout, int, 0);4141-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");4343+MODULE_PARM_DESC(nowayout,4444+ "Watchdog cannot be stopped once started (default="4545+ __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");42464347static struct platform_device *geodewdt_platform_device;4448static unsigned long wdt_flags;···273269 if (ret)274270 return ret;275271276276- geodewdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0);272272+ geodewdt_platform_device = platform_device_register_simple(DRV_NAME,273273+ -1, NULL, 0);277274 if (IS_ERR(geodewdt_platform_device)) {278275 ret = PTR_ERR(geodewdt_platform_device);279276 goto err;
+2-1
drivers/watchdog/hpwdt.c
···137137};138138MODULE_DEVICE_TABLE(pci, hpwdt_devices);139139140140-extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs, unsigned long *pRomEntry);140140+extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs,141141+ unsigned long *pRomEntry);141142142143#ifndef CONFIG_X86_64143144/* --32 Bit Bios------------------------------------------------------------ */
+2-1
drivers/watchdog/i6300esb.c
···240240 * five months ago... */241241 esb_expect_close = 0;242242243243- /* scan to see whether or not we got the magic character */243243+ /* scan to see whether or not we got the244244+ * magic character */244245 for (i = 0; i != len; i++) {245246 char c;246247 if (get_user(c, data + i))
+4-2
drivers/watchdog/iTCO_vendor_support.c
···47474848static int vendorsupport;4949module_param(vendorsupport, int, 0);5050-MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default=0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+");5050+MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="5151+ "0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+");51525253/*5354 * Vendor Specific Support···306305module_init(iTCO_vendor_init_module);307306module_exit(iTCO_vendor_exit_module);308307309309-MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, R. Seretny <lkpatches@paypc.com>");308308+MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, "309309+ "R. Seretny <lkpatches@paypc.com>");310310MODULE_DESCRIPTION("Intel TCO Vendor Specific WatchDog Timer Driver Support");311311MODULE_VERSION(DRV_VERSION);312312MODULE_LICENSE("GPL");
+10-5
drivers/watchdog/iTCO_wdt.c
···273273#define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */274274static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */275275module_param(heartbeat, int, 0);276276-MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<heartbeat<39 (TCO v1) or 613 (TCO v2), default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");276276+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "277277+ "(2<heartbeat<39 (TCO v1) or 613 (TCO v2), default="278278+ __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");277279278280static int nowayout = WATCHDOG_NOWAYOUT;279281module_param(nowayout, int, 0);···348346 /* disable chipset's NO_REBOOT bit */349347 if (iTCO_wdt_unset_NO_REBOOT_bit()) {350348 spin_unlock(&iTCO_wdt_private.io_lock);351351- printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n");349349+ printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, "350350+ "reboot disabled by hardware\n");352351 return -EIO;353352 }354353···672669673670 /* Check chipset's NO_REBOOT bit */674671 if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) {675675- printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n");672672+ printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, "673673+ "reboot disabled by hardware\n");676674 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */677675 goto out;678676 }···720716 if not reset to the default */721717 if (iTCO_wdt_set_heartbeat(heartbeat)) {722718 iTCO_wdt_set_heartbeat(WATCHDOG_HEARTBEAT);723723- printk(KERN_INFO PFX "heartbeat value must be 2 < heartbeat < 39 (TCO v1) or 613 (TCO v2), using %d\n",724724- heartbeat);719719+ printk(KERN_INFO PFX720720+ "heartbeat value must be 2 < heartbeat < 39 (TCO v1) "721721+ "or 613 (TCO v2), using %d\n", heartbeat);725722 }726723727724 ret = misc_register(&iTCO_wdt_miscdev);
···55 *66 * Based on the SoftDog driver:77 * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,88- * All Rights Reserved.88+ * All Rights Reserved.99 *1010 * This program is free software; you can redistribute it and/or1111 * modify it under the terms of the GNU General Public License
+1-1
drivers/watchdog/mtx-1_wdt.c
···55 * All Rights Reserved.66 * http://www.4g-systems.biz77 *88- * (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org>88+ * (C) Copyright 2007 OpenWrt.org, Florian Fainelli <florian@openwrt.org>99 *1010 * This program is free software; you can redistribute it and/or1111 * modify it under the terms of the GNU General Public License
+4-2
drivers/watchdog/pc87413_wdt.c
···536536537537 ret = misc_register(&pc87413_miscdev);538538 if (ret != 0) {539539- printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",539539+ printk(KERN_ERR PFX540540+ "cannot register miscdev on minor=%d (err=%d)\n",540541 WATCHDOG_MINOR, ret);541542 unregister_reboot_notifier(&pc87413_notifier);542543 return ret;···575574module_init(pc87413_init);576575module_exit(pc87413_exit);577576578578-MODULE_AUTHOR("Sven Anders <anders@anduras.de>, Marcus Junker <junker@anduras.de>,");577577+MODULE_AUTHOR("Sven Anders <anders@anduras.de>, "578578+ "Marcus Junker <junker@anduras.de>,");579579MODULE_DESCRIPTION("PC87413 WDT driver");580580MODULE_LICENSE("GPL");581581
+25-19
drivers/watchdog/pcwd.c
···2424 * version reporting. Added read routine for temperature.2525 * Removed some extra defines, added an autodetect Revision2626 * routine.2727- * 961006 Revised some documentation, fixed some cosmetic bugs. Made2828- * drivers to panic the system if it's overheating at bootup.2727+ * 961006 Revised some documentation, fixed some cosmetic bugs. Made2828+ * drivers to panic the system if it's overheating at bootup.2929 * 961118 Changed some verbiage on some of the output, tidied up3030 * code bits, and added compatibility to 2.1.x.3131- * 970912 Enabled board on open and disable on close.3131+ * 970912 Enabled board on open and disable on close.3232 * 971107 Took account of recent VFS changes (broke read).3333- * 971210 Disable board on initialisation in case board already ticking.3434- * 971222 Changed open/close for temperature handling3535- * Michael Meskes <meskes@debian.org>.3636- * 980112 Used minor numbers from include/linux/miscdevice.h3737- * 990403 Clear reset status after reading control status register in3838- * pcwd_showprevstate(). [Marc Boucher <marc@mbsi.ca>]3333+ * 971210 Disable board on initialisation in case board already ticking.3434+ * 971222 Changed open/close for temperature handling3535+ * Michael Meskes <meskes@debian.org>.3636+ * 980112 Used minor numbers from include/linux/miscdevice.h3737+ * 990403 Clear reset status after reading control status register in3838+ * pcwd_showprevstate(). [Marc Boucher <marc@mbsi.ca>]3939 * 990605 Made changes to code to support Firmware 1.22a, added4040 * fairly useless proc entry.4141 * 990610 removed said useless proc code for the merge <alan>4242 * 000403 Removed last traces of proc code. <davej>4343 * 011214 Added nowayout module option to override4444 * CONFIG_WATCHDOG_NOWAYOUT <Matt_Domsch@dell.com>4545- * Added timeout module option to override default4545+ * Added timeout module option to override default4646 */47474848/*···7676#define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog"7777#define WATCHDOG_NAME "pcwd"7878#define PFX WATCHDOG_NAME ": "7979-#define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n"8080-#define WD_VER WATCHDOG_VERSION " (" WATCHDOG_DATE ")"7979+#define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION "\n"81808281/*8382 * It should be noted that PCWD_REVISION_B was removed because A and B···199200#define WATCHDOG_HEARTBEAT 0200201static int heartbeat = WATCHDOG_HEARTBEAT;201202module_param(heartbeat, int, 0);202202-MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");203203+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "204204+ "(2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default="205205+ __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");203206204207static int nowayout = WATCHDOG_NOWAYOUT;205208module_param(nowayout, int, 0);···240239 }241240242241 if (debug >= DEBUG)243243- printk(KERN_DEBUG PFX "received following data for cmd=0x%02x: port0=0x%02x last_port0=0x%02x\n",242242+ printk(KERN_DEBUG PFX "received following data for "243243+ "cmd=0x%02x: port0=0x%02x last_port0=0x%02x\n",244244 cmd, port0, last_port0);245245246246 return port0;···341339 pcwd_private.io_addr);342340 else if (pcwd_private.revision == PCWD_REVISION_C) {343341 pcwd_get_firmware();344344- printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n",342342+ printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port "343343+ "0x%04x (Firmware version: %s)\n",345344 pcwd_private.io_addr, pcwd_private.fw_ver_str);346345 option_switches = pcwd_get_option_switches();347347- printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n",346346+ printk(KERN_INFO PFX "Option switches (0x%02x): "347347+ "Temperature Reset Enable=%s, Power On Delay=%s\n",348348 option_switches,349349 ((option_switches & 0x10) ? "ON" : "OFF"),350350 ((option_switches & 0x08) ? "ON" : "OFF"));···362358 printk(KERN_INFO PFX "Temperature Option Detected\n");363359364360 if (pcwd_private.boot_status & WDIOF_CARDRESET)365365- printk(KERN_INFO PFX "Previous reboot was caused by the card\n");361361+ printk(KERN_INFO PFX362362+ "Previous reboot was caused by the card\n");366363367364 if (pcwd_private.boot_status & WDIOF_OVERHEAT) {368365 printk(KERN_EMERG PFX···876871 cards_found++;877872 if (cards_found == 1)878873 printk(KERN_INFO PFX "v%s Ken Hollis (kenji@bitgate.com)\n",879879- WD_VER);874874+ WATCHDOG_VERSION);880875881876 if (cards_found > 1) {882877 printk(KERN_ERR PFX "This driver only supports 1 device\n");···10311026module_init(pcwd_init_module);10321027module_exit(pcwd_cleanup_module);1033102810341034-MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, Wim Van Sebroeck <wim@iguana.be>");10291029+MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, "10301030+ "Wim Van Sebroeck <wim@iguana.be>");10351031MODULE_DESCRIPTION("Berkshire ISA-PC Watchdog driver");10361032MODULE_VERSION(WATCHDOG_VERSION);10371033MODULE_LICENSE("GPL");
+69-39
drivers/watchdog/pcwd_pci.c
···2424 * A bells and whistles driver is available from:2525 * http://www.kernel.org/pub/linux/kernel/people/wim/pcwd/pcwd_pci/2626 *2727- * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/2727+ * More info available at2828+ * http://www.berkprod.com/ or http://www.pcwatchdog.com/2829 */29303031/*···52515352/* Module and version information */5453#define WATCHDOG_VERSION "1.03"5555-#define WATCHDOG_DATE "21 Jan 2007"5654#define WATCHDOG_DRIVER_NAME "PCI-PC Watchdog"5755#define WATCHDOG_NAME "pcwd_pci"5856#define PFX WATCHDOG_NAME ": "5959-#define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n"5757+#define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION "\n"60586159/* Stuff for the PCI ID's */6260#ifndef PCI_VENDOR_ID_QUICKLOGIC···7676#define WD_PCI_TTRP 0x04 /* Temperature Trip status */7777#define WD_PCI_RL2A 0x08 /* Relay 2 Active */7878#define WD_PCI_RL1A 0x10 /* Relay 1 Active */7979-#define WD_PCI_R2DS 0x40 /* Relay 2 Disable Temperature-trip/reset */7979+#define WD_PCI_R2DS 0x40 /* Relay 2 Disable Temperature-trip /8080+ reset */8081#define WD_PCI_RLY2 0x80 /* Activate Relay 2 on the board */8182/* Port 2 : Control Status #2 */8283#define WD_PCI_WDIS 0x10 /* Watchdog Disable */···115114static int temp_panic;116115static unsigned long is_active;117116static char expect_release;118118-static struct { /* this is private data for each PCI-PC watchdog card */119119- int supports_temp; /* Wether or not the card has a temperature device */120120- int boot_status; /* The card's boot status */121121- unsigned long io_addr; /* The cards I/O address */122122- spinlock_t io_lock; /* the lock for io operations */123123- struct pci_dev *pdev; /* the PCI-device */117117+/* this is private data for each PCI-PC watchdog card */118118+static struct {119119+ /* Wether or not the card has a temperature device */120120+ int supports_temp;121121+ /* The card's boot status */122122+ int boot_status;123123+ /* The cards I/O address */124124+ unsigned long io_addr;125125+ /* the lock for io operations */126126+ spinlock_t io_lock;127127+ /* the PCI-device */128128+ struct pci_dev *pdev;124129} pcipcwd_private;125130126131/* module parameters */···137130module_param(debug, int, 0);138131MODULE_PARM_DESC(debug, "Debug level: 0=Quiet, 1=Verbose, 2=Debug (default=0)");139132140140-#define WATCHDOG_HEARTBEAT 0 /* default heartbeat = delay-time from dip-switches */133133+#define WATCHDOG_HEARTBEAT 0 /* default heartbeat =134134+ delay-time from dip-switches */141135static int heartbeat = WATCHDOG_HEARTBEAT;142136module_param(heartbeat, int, 0);143143-MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");137137+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "138138+ "(0<heartbeat<65536 or 0=delay-time from dip-switches, default="139139+ __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");144140145141static int nowayout = WATCHDOG_NOWAYOUT;146142module_param(nowayout, int, 0);147147-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");143143+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="144144+ __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");148145149146/*150147 * Internal functions···159148 int got_response, count;160149161150 if (debug >= DEBUG)162162- printk(KERN_DEBUG PFX "sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x\n",163163- cmd, *msb, *lsb);151151+ printk(KERN_DEBUG PFX "sending following data "152152+ "cmd=0x%02x msb=0x%02x lsb=0x%02x\n", cmd, *msb, *lsb);164153165154 spin_lock(&pcipcwd_private.io_lock);166155 /* If a command requires data it should be written first.···177166 * the WRSP bit in port 2 and give it a max. timeout of178167 * PCI_COMMAND_TIMEOUT to process */179168 got_response = inb_p(pcipcwd_private.io_addr + 2) & WD_PCI_WRSP;180180- for (count = 0; (count < PCI_COMMAND_TIMEOUT) && (!got_response); count++) {169169+ for (count = 0; (count < PCI_COMMAND_TIMEOUT) && (!got_response);170170+ count++) {181171 mdelay(1);182172 got_response = inb_p(pcipcwd_private.io_addr + 2) & WD_PCI_WRSP;183173 }184174185175 if (debug >= DEBUG) {186176 if (got_response) {187187- printk(KERN_DEBUG PFX "time to process command was: %d ms\n",177177+ printk(KERN_DEBUG PFX178178+ "time to process command was: %d ms\n",188179 count);189180 } else {190190- printk(KERN_DEBUG PFX "card did not respond on command!\n");181181+ printk(KERN_DEBUG PFX182182+ "card did not respond on command!\n");191183 }192184 }193185···203189 inb_p(pcipcwd_private.io_addr + 6);204190205191 if (debug >= DEBUG)206206- printk(KERN_DEBUG PFX "received following data for cmd=0x%02x: msb=0x%02x lsb=0x%02x\n",192192+ printk(KERN_DEBUG PFX "received following data for "193193+ "cmd=0x%02x: msb=0x%02x lsb=0x%02x\n",207194 cmd, *msb, *lsb);208195 }209196···233218 char fw_ver_str[20]; /* The cards firmware version */234219 int option_switches;235220236236- got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor);221221+ got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major,222222+ &fw_rev_minor);237223 if (got_fw_rev)238224 sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor);239225 else···243227 /* Get switch settings */244228 option_switches = pcipcwd_get_option_switches();245229246246- printk(KERN_INFO PFX "Found card at port 0x%04x (Firmware: %s) %s temp option\n",230230+ printk(KERN_INFO PFX "Found card at port "231231+ "0x%04x (Firmware: %s) %s temp option\n",247232 (int) pcipcwd_private.io_addr, fw_ver_str,248233 (pcipcwd_private.supports_temp ? "with" : "without"));249234250250- printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n",235235+ printk(KERN_INFO PFX "Option switches (0x%02x): "236236+ "Temperature Reset Enable=%s, Power On Delay=%s\n",251237 option_switches,252238 ((option_switches & 0x10) ? "ON" : "OFF"),253239 ((option_switches & 0x08) ? "ON" : "OFF"));254240255241 if (pcipcwd_private.boot_status & WDIOF_CARDRESET)256256- printk(KERN_INFO PFX "Previous reset was caused by the Watchdog card\n");242242+ printk(KERN_INFO PFX243243+ "Previous reset was caused by the Watchdog card\n");257244258245 if (pcipcwd_private.boot_status & WDIOF_OVERHEAT)259246 printk(KERN_INFO PFX "Card sensed a CPU Overheat\n");260247261248 if (pcipcwd_private.boot_status == 0)262262- printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n");249249+ printk(KERN_INFO PFX250250+ "No previous trip detected - Cold boot or reset\n");263251}264252265253static int pcipcwd_start(void)···303283 spin_unlock(&pcipcwd_private.io_lock);304284305285 if (!(stat_reg & WD_PCI_WDIS)) {306306- printk(KERN_ERR PFX "Card did not acknowledge disable attempt\n");286286+ printk(KERN_ERR PFX287287+ "Card did not acknowledge disable attempt\n");307288 return -1;308289 }309290···385364 }386365387366 /* clear trip status & LED and keep mode of relay 2 */388388- outb_p((control_status & WD_PCI_R2DS) | WD_PCI_WTRP, pcipcwd_private.io_addr + 1);367367+ outb_p((control_status & WD_PCI_R2DS) | WD_PCI_WTRP,368368+ pcipcwd_private.io_addr + 1);389369390370 /* clear reset counter */391371 msb = 0;···459437 * five months ago... */460438 expect_release = 0;461439462462- /* scan to see whether or not we got the magic character */440440+ /* scan to see whether or not we got the441441+ * magic character */463442 for (i = 0; i != len; i++) {464443 char c;465444 if (get_user(c, data + i))···554531 return -EFAULT;555532556533 if (pcipcwd_set_heartbeat(new_heartbeat))557557- return -EINVAL;534534+ return -EINVAL;558535559536 pcipcwd_keepalive();560537 /* Fall */···583560 /* /dev/watchdog can only be opened once */584561 if (test_and_set_bit(0, &is_active)) {585562 if (debug >= VERBOSE)586586- printk(KERN_ERR PFX "Attempt to open already opened device.\n");563563+ printk(KERN_ERR PFX564564+ "Attempt to open already opened device.\n");587565 return -EBUSY;588566 }589567···602578 if (expect_release == 42) {603579 pcipcwd_stop();604580 } else {605605- printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");581581+ printk(KERN_CRIT PFX582582+ "Unexpected close, not stopping watchdog!\n");606583 pcipcwd_keepalive();607584 }608585 expect_release = 0;···646621 * Notify system647622 */648623649649-static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused)624624+static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code,625625+ void *unused)650626{651627 if (code == SYS_DOWN || code == SYS_HALT)652628 pcipcwd_stop(); /* Turn the WDT off */···748722749723 /* If heartbeat = 0 then we use the heartbeat from the dip-switches */750724 if (heartbeat == 0)751751- heartbeat = heartbeat_tbl[(pcipcwd_get_option_switches() & 0x07)];725725+ heartbeat =726726+ heartbeat_tbl[(pcipcwd_get_option_switches() & 0x07)];752727753753- /* Check that the heartbeat value is within it's range ; if not reset to the default */728728+ /* Check that the heartbeat value is within it's range ;729729+ * if not reset to the default */754730 if (pcipcwd_set_heartbeat(heartbeat)) {755731 pcipcwd_set_heartbeat(WATCHDOG_HEARTBEAT);756756- printk(KERN_INFO PFX "heartbeat value must be 0<heartbeat<65536, using %d\n",732732+ printk(KERN_INFO PFX733733+ "heartbeat value must be 0<heartbeat<65536, using %d\n",757734 WATCHDOG_HEARTBEAT);758735 }759736760737 ret = register_reboot_notifier(&pcipcwd_notifier);761738 if (ret != 0) {762762- printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",763763- ret);739739+ printk(KERN_ERR PFX740740+ "cannot register reboot notifier (err=%d)\n", ret);764741 goto err_out_release_region;765742 }766743767744 if (pcipcwd_private.supports_temp) {768745 ret = misc_register(&pcipcwd_temp_miscdev);769746 if (ret != 0) {770770- printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",771771- TEMP_MINOR, ret);747747+ printk(KERN_ERR PFX "cannot register miscdev on "748748+ "minor=%d (err=%d)\n", TEMP_MINOR, ret);772749 goto err_out_unregister_reboot;773750 }774751 }775752776753 ret = misc_register(&pcipcwd_miscdev);777754 if (ret != 0) {778778- printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",755755+ printk(KERN_ERR PFX756756+ "cannot register miscdev on minor=%d (err=%d)\n",779757 WATCHDOG_MINOR, ret);780758 goto err_out_misc_deregister;781759 }
+104-59
drivers/watchdog/pcwd_usb.c
···51515252/* Use our own dbg macro */5353#undef dbg5454-#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG PFX format "\n" , ## arg); } while (0)5555-5454+#define dbg(format, arg...) \5555+ do { if (debug) printk(KERN_DEBUG PFX format "\n" , ## arg); } while (0)56565757/* Module and Version Information */5858#define DRIVER_VERSION "1.02"5959-#define DRIVER_DATE "21 Jan 2007"6059#define DRIVER_AUTHOR "Wim Van Sebroeck <wim@iguana.be>"6160#define DRIVER_DESC "Berkshire USB-PC Watchdog driver"6261#define DRIVER_LICENSE "GPL"···7273module_param(debug, int, 0);7374MODULE_PARM_DESC(debug, "Debug enabled or not");74757575-#define WATCHDOG_HEARTBEAT 0 /* default heartbeat = delay-time from dip-switches */7676+#define WATCHDOG_HEARTBEAT 0 /* default heartbeat =7777+ delay-time from dip-switches */7678static int heartbeat = WATCHDOG_HEARTBEAT;7779module_param(heartbeat, int, 0);7878-MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");8080+MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "8181+ "(0<heartbeat<65536 or 0=delay-time from dip-switches, default="8282+ __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");79838084static int nowayout = WATCHDOG_NOWAYOUT;8185module_param(nowayout, int, 0);8282-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");8686+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="8787+ __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");83888489/* The vendor and product id's for the USB-PC Watchdog card */8590#define USB_PCWD_VENDOR_ID 0x0c98···9491 { USB_DEVICE(USB_PCWD_VENDOR_ID, USB_PCWD_PRODUCT_ID) },9592 { } /* Terminating entry */9693};9797-MODULE_DEVICE_TABLE (usb, usb_pcwd_table);9494+MODULE_DEVICE_TABLE(usb, usb_pcwd_table);98959996/* according to documentation max. time to process a command for the USB10097 * watchdog card is 100 or 200 ms, so we give it 250 ms to do it's job */10198#define USB_COMMAND_TIMEOUT 25010299103100/* Watchdog's internal commands */104104-#define CMD_READ_TEMP 0x02 /* Read Temperature; Re-trigger Watchdog */101101+#define CMD_READ_TEMP 0x02 /* Read Temperature;102102+ Re-trigger Watchdog */105103#define CMD_TRIGGER CMD_READ_TEMP106104#define CMD_GET_STATUS 0x04 /* Get Status Information */107105#define CMD_GET_FIRMWARE_VERSION 0x08 /* Get Firmware Version */108106#define CMD_GET_DIP_SWITCH_SETTINGS 0x0c /* Get Dip Switch Settings */109107#define CMD_READ_WATCHDOG_TIMEOUT 0x18 /* Read Current Watchdog Time */110110-#define CMD_WRITE_WATCHDOG_TIMEOUT 0x19 /* Write Current Watchdog Time */108108+#define CMD_WRITE_WATCHDOG_TIMEOUT 0x19 /* Write Current WatchdogTime */111109#define CMD_ENABLE_WATCHDOG 0x30 /* Enable / Disable Watchdog */112110#define CMD_DISABLE_WATCHDOG CMD_ENABLE_WATCHDOG113111···133129134130/* Structure to hold all of our device specific stuff */135131struct usb_pcwd_private {136136- struct usb_device *udev; /* save off the usb device pointer */137137- struct usb_interface *interface; /* the interface for this device */132132+ /* save off the usb device pointer */133133+ struct usb_device *udev;134134+ /* the interface for this device */135135+ struct usb_interface *interface;138136139139- unsigned int interface_number; /* the interface number used for cmd's */137137+ /* the interface number used for cmd's */138138+ unsigned int interface_number;140139141141- unsigned char *intr_buffer; /* the buffer to intr data */142142- dma_addr_t intr_dma; /* the dma address for the intr buffer */143143- size_t intr_size; /* the size of the intr buffer */144144- struct urb *intr_urb; /* the urb used for the intr pipe */140140+ /* the buffer to intr data */141141+ unsigned char *intr_buffer;142142+ /* the dma address for the intr buffer */143143+ dma_addr_t intr_dma;144144+ /* the size of the intr buffer */145145+ size_t intr_size;146146+ /* the urb used for the intr pipe */147147+ struct urb *intr_urb;145148146146- unsigned char cmd_command; /* The command that is reported back */147147- unsigned char cmd_data_msb; /* The data MSB that is reported back */148148- unsigned char cmd_data_lsb; /* The data LSB that is reported back */149149- atomic_t cmd_received; /* true if we received a report after a command */149149+ /* The command that is reported back */150150+ unsigned char cmd_command;151151+ /* The data MSB that is reported back */152152+ unsigned char cmd_data_msb;153153+ /* The data LSB that is reported back */154154+ unsigned char cmd_data_lsb;155155+ /* true if we received a report after a command */156156+ atomic_t cmd_received;150157151151- int exists; /* Wether or not the device exists */152152- struct mutex mtx; /* locks this structure */158158+ /* Wether or not the device exists */159159+ int exists;160160+ /* locks this structure */161161+ struct mutex mtx;153162};154163static struct usb_pcwd_private *usb_pcwd_device;155164···170153static DEFINE_MUTEX(disconnect_mutex);171154172155/* local function prototypes */173173-static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_device_id *id);156156+static int usb_pcwd_probe(struct usb_interface *interface,157157+ const struct usb_device_id *id);174158static void usb_pcwd_disconnect(struct usb_interface *interface);175159176160/* usb specific object needed to register this driver with the usb subsystem */···185167186168static void usb_pcwd_intr_done(struct urb *urb)187169{188188- struct usb_pcwd_private *usb_pcwd = (struct usb_pcwd_private *)urb->context;170170+ struct usb_pcwd_private *usb_pcwd =171171+ (struct usb_pcwd_private *)urb->context;189172 unsigned char *data = usb_pcwd->intr_buffer;190173 int retval;191174···197178 case -ENOENT:198179 case -ESHUTDOWN:199180 /* this urb is terminated, clean up */200200- dbg("%s - urb shutting down with status: %d", __func__, urb->status);181181+ dbg("%s - urb shutting down with status: %d", __func__,182182+ urb->status);201183 return;202184 /* -EPIPE: should clear the halt */203185 default: /* error */204204- dbg("%s - nonzero urb status received: %d", __func__, urb->status);186186+ dbg("%s - nonzero urb status received: %d", __func__,187187+ urb->status);205188 goto resubmit;206189 }207190···220199resubmit:221200 retval = usb_submit_urb(urb, GFP_ATOMIC);222201 if (retval)223223- printk(KERN_ERR PFX "can't resubmit intr, usb_submit_urb failed with result %d\n",224224- retval);202202+ printk(KERN_ERR PFX "can't resubmit intr, "203203+ "usb_submit_urb failed with result %d\n", retval);225204}226205227227-static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd, unsigned char cmd,228228- unsigned char *msb, unsigned char *lsb)206206+static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd,207207+ unsigned char cmd, unsigned char *msb, unsigned char *lsb)229208{230209 int got_response, count;231210 unsigned char buf[6];232211233233- /* We will not send any commands if the USB PCWD device does not exist */212212+ /* We will not send any commands if the USB PCWD device does213213+ * not exist */234214 if ((!usb_pcwd) || (!usb_pcwd->exists))235215 return -1;236216237237- /* The USB PC Watchdog uses a 6 byte report format. The board currently uses238238- * only 3 of the six bytes of the report. */217217+ /* The USB PC Watchdog uses a 6 byte report format.218218+ * The board currently uses only 3 of the six bytes of the report. */239219 buf[0] = cmd; /* Byte 0 = CMD */240220 buf[1] = *msb; /* Byte 1 = Data MSB */241221 buf[2] = *lsb; /* Byte 2 = Data LSB */···251229 HID_REQ_SET_REPORT, HID_DT_REPORT,252230 0x0200, usb_pcwd->interface_number, buf, sizeof(buf),253231 USB_COMMAND_TIMEOUT) != sizeof(buf)) {254254- dbg("usb_pcwd_send_command: error in usb_control_msg for cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb);232232+ dbg("usb_pcwd_send_command: error in usb_control_msg for "233233+ "cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb);255234 }256235 /* wait till the usb card processed the command,257236 * with a max. timeout of USB_COMMAND_TIMEOUT */258237 got_response = 0;259259- for (count = 0; (count < USB_COMMAND_TIMEOUT) && (!got_response); count++) {238238+ for (count = 0; (count < USB_COMMAND_TIMEOUT) && (!got_response);239239+ count++) {260240 mdelay(1);261241 if (atomic_read(&usb_pcwd->cmd_received))262242 got_response = 1;···280256 int retval;281257282258 /* Enable Watchdog */283283- retval = usb_pcwd_send_command(usb_pcwd, CMD_ENABLE_WATCHDOG, &msb, &lsb);259259+ retval = usb_pcwd_send_command(usb_pcwd, CMD_ENABLE_WATCHDOG,260260+ &msb, &lsb);284261285262 if ((retval == 0) || (lsb == 0)) {286286- printk(KERN_ERR PFX "Card did not acknowledge enable attempt\n");263263+ printk(KERN_ERR PFX264264+ "Card did not acknowledge enable attempt\n");287265 return -1;288266 }289267···299273 int retval;300274301275 /* Disable Watchdog */302302- retval = usb_pcwd_send_command(usb_pcwd, CMD_DISABLE_WATCHDOG, &msb, &lsb);276276+ retval = usb_pcwd_send_command(usb_pcwd, CMD_DISABLE_WATCHDOG,277277+ &msb, &lsb);303278304279 if ((retval == 0) || (lsb != 0)) {305305- printk(KERN_ERR PFX "Card did not acknowledge disable attempt\n");280280+ printk(KERN_ERR PFX281281+ "Card did not acknowledge disable attempt\n");306282 return -1;307283 }308284···336308 return 0;337309}338310339339-static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd, int *temperature)311311+static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd,312312+ int *temperature)340313{341314 unsigned char msb, lsb;342315···352323 return 0;353324}354325355355-static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd, int *time_left)326326+static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd,327327+ int *time_left)356328{357329 unsigned char msb, lsb;358330···371341 */372342373343static ssize_t usb_pcwd_write(struct file *file, const char __user *data,374374- size_t len, loff_t *ppos)344344+ size_t len, loff_t *ppos)375345{376346 /* See if we got the magic character 'V' and reload the timer */377347 if (len) {···382352 * five months ago... */383353 expect_release = 0;384354385385- /* scan to see whether or not we got the magic character */355355+ /* scan to see whether or not we got the356356+ * magic character */386357 for (i = 0; i != len; i++) {387358 char c;388359 if (get_user(c, data + i))···462431 return -EFAULT;463432464433 if (usb_pcwd_set_heartbeat(usb_pcwd_device, new_heartbeat))465465- return -EINVAL;434434+ return -EINVAL;466435467436 usb_pcwd_keepalive(usb_pcwd_device);468437 /* Fall */···506475 if (expect_release == 42) {507476 usb_pcwd_stop(usb_pcwd_device);508477 } else {509509- printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");478478+ printk(KERN_CRIT PFX479479+ "Unexpected close, not stopping watchdog!\n");510480 usb_pcwd_keepalive(usb_pcwd_device);511481 }512482 expect_release = 0;···547515 * Notify system548516 */549517550550-static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused)518518+static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code,519519+ void *unused)551520{552521 if (code == SYS_DOWN || code == SYS_HALT)553522 usb_pcwd_stop(usb_pcwd_device); /* Turn the WDT off */···611578 * Called by the usb core when a new device is connected that it thinks612579 * this driver might be interested in.613580 */614614-static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_device_id *id)581581+static int usb_pcwd_probe(struct usb_interface *interface,582582+ const struct usb_device_id *id)615583{616584 struct usb_device *udev = interface_to_usbdev(interface);617585 struct usb_host_interface *iface_desc;···636602637603 /* check out that we have a HID device */638604 if (!(iface_desc->desc.bInterfaceClass == USB_CLASS_HID)) {639639- printk(KERN_ERR PFX "The device isn't a Human Interface Device\n");605605+ printk(KERN_ERR PFX606606+ "The device isn't a Human Interface Device\n");640607 return -ENODEV;641608 }642609···667632 usb_pcwd->udev = udev;668633 usb_pcwd->interface = interface;669634 usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber;670670- usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ? le16_to_cpu(endpoint->wMaxPacketSize) : 8);635635+ usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ?636636+ le16_to_cpu(endpoint->wMaxPacketSize) : 8);671637672638 /* set up the memory buffer's */673673- usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, GFP_ATOMIC, &usb_pcwd->intr_dma);639639+ usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size,640640+ GFP_ATOMIC, &usb_pcwd->intr_dma);674641 if (!usb_pcwd->intr_buffer) {675642 printk(KERN_ERR PFX "Out of memory\n");676643 goto error;···706669 usb_pcwd_stop(usb_pcwd);707670708671 /* Get the Firmware Version */709709- got_fw_rev = usb_pcwd_send_command(usb_pcwd, CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor);672672+ got_fw_rev = usb_pcwd_send_command(usb_pcwd, CMD_GET_FIRMWARE_VERSION,673673+ &fw_rev_major, &fw_rev_minor);710674 if (got_fw_rev)711675 sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor);712676 else···717679 fw_ver_str);718680719681 /* Get switch settings */720720- usb_pcwd_send_command(usb_pcwd, CMD_GET_DIP_SWITCH_SETTINGS, &dummy, &option_switches);682682+ usb_pcwd_send_command(usb_pcwd, CMD_GET_DIP_SWITCH_SETTINGS, &dummy,683683+ &option_switches);721684722722- printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n",685685+ printk(KERN_INFO PFX "Option switches (0x%02x): "686686+ "Temperature Reset Enable=%s, Power On Delay=%s\n",723687 option_switches,724688 ((option_switches & 0x10) ? "ON" : "OFF"),725689 ((option_switches & 0x08) ? "ON" : "OFF"));···730690 if (heartbeat == 0)731691 heartbeat = heartbeat_tbl[(option_switches & 0x07)];732692733733- /* Check that the heartbeat value is within it's range ; if not reset to the default */693693+ /* Check that the heartbeat value is within it's range ;694694+ * if not reset to the default */734695 if (usb_pcwd_set_heartbeat(usb_pcwd, heartbeat)) {735696 usb_pcwd_set_heartbeat(usb_pcwd, WATCHDOG_HEARTBEAT);736736- printk(KERN_INFO PFX "heartbeat value must be 0<heartbeat<65536, using %d\n",697697+ printk(KERN_INFO PFX698698+ "heartbeat value must be 0<heartbeat<65536, using %d\n",737699 WATCHDOG_HEARTBEAT);738700 }739701740702 retval = register_reboot_notifier(&usb_pcwd_notifier);741703 if (retval != 0) {742742- printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",704704+ printk(KERN_ERR PFX705705+ "cannot register reboot notifier (err=%d)\n",743706 retval);744707 goto error;745708 }746709747710 retval = misc_register(&usb_pcwd_temperature_miscdev);748711 if (retval != 0) {749749- printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",712712+ printk(KERN_ERR PFX713713+ "cannot register miscdev on minor=%d (err=%d)\n",750714 TEMP_MINOR, retval);751715 goto err_out_unregister_reboot;752716 }753717754718 retval = misc_register(&usb_pcwd_miscdev);755719 if (retval != 0) {756756- printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",720720+ printk(KERN_ERR PFX721721+ "cannot register miscdev on minor=%d (err=%d)\n",757722 WATCHDOG_MINOR, retval);758723 goto err_out_misc_deregister;759724 }···844799 return result;845800 }846801847847- printk(KERN_INFO PFX DRIVER_DESC " v" DRIVER_VERSION " (" DRIVER_DATE ")\n");802802+ printk(KERN_INFO PFX DRIVER_DESC " v" DRIVER_VERSION "\n");848803 return 0;849804}850805
···11/*22 * Watchdog driver for the SA11x0/PXA2xx33 *44- * (c) Copyright 2000 Oleg Drokin <green@crimea.edu>55- * Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk>44+ * (c) Copyright 2000 Oleg Drokin <green@crimea.edu>55+ * Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk>66 *77 * This program is free software; you can redistribute it and/or88 * modify it under the terms of the GNU General Public License···1515 *1616 * (c) Copyright 2000 Oleg Drokin <green@crimea.edu>1717 *1818- * 27/11/2000 Initial release1818+ * 27/11/2000 Initial release1919 */2020#include <linux/module.h>2121#include <linux/moduleparam.h>
+1-1
drivers/watchdog/sbc60xxwdt.c
···11/*22 * 60xx Single Board Computer Watchdog Timer driver for Linux 2.2.x33 *44- * Based on acquirewdt.c by Alan Cox.44+ * Based on acquirewdt.c by Alan Cox.55 *66 * This program is free software; you can redistribute it and/or77 * modify it under the terms of the GNU General Public License
+6-6
drivers/watchdog/sbc8360.c
···44 * (c) Copyright 2005 Webcon, Inc.55 *66 * Based on ib700wdt.c, which is based on advantechwdt.c which is based77- * on acquirewdt.c which is based on wdt.c.77+ * on acquirewdt.c which is based on wdt.c.88 *99 * (c) Copyright 2001 Charles Howes <chowes@vsol.net>1010 *1111- * Based on advantechwdt.c which is based on acquirewdt.c which1212- * is based on wdt.c.1111+ * Based on advantechwdt.c which is based on acquirewdt.c which1212+ * is based on wdt.c.1313 *1414 * (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl>1515 *···3030 *3131 * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>3232 *3333- * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>3434- * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT3535- * Added timeout module option to override default3333+ * 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>3434+ * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT3535+ * Added timeout module option to override default3636 *3737 */3838
+2-1
drivers/watchdog/sbc_epx_c3.c
···35353636static int nowayout = WATCHDOG_NOWAYOUT;3737module_param(nowayout, int, 0);3838-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");3838+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="3939+ __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");39404041#define EPXC3_WATCHDOG_CTL_REG 0x1ee /* write 1 to enable, 0 to disable */4142#define EPXC3_WATCHDOG_PET_REG 0x1ef /* write anything to pet once enabled */
+4-3
drivers/watchdog/sc1200wdt.c
···7171#define UART2_IRQ 0x04 /* Serial1 */7272/* 5 -7 are reserved */73737474-static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER;7474+static char banner[] __initdata = PFX SC1200_MODULE_VER;7575static int timeout = 1;7676static int io = -1;7777static int io_len = 2; /* for non plug and play */···392392{393393 int ret;394394395395- printk("%s\n", banner);395395+ printk(KERN_INFO "%s\n", banner);396396397397#if defined CONFIG_PNP398398 if (isapnp) {···477477module_exit(sc1200wdt_exit);478478479479MODULE_AUTHOR("Zwane Mwaikambo <zwane@commfireservices.com>");480480-MODULE_DESCRIPTION("Driver for National Semiconductor PC87307/PC97307 watchdog component");480480+MODULE_DESCRIPTION(481481+ "Driver for National Semiconductor PC87307/PC97307 watchdog component");481482MODULE_LICENSE("GPL");482483MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+5-4
drivers/watchdog/sc520_wdt.c
···11/*22 * AMD Elan SC520 processor Watchdog Timer driver33 *44- * Based on acquirewdt.c by Alan Cox,55- * and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net>44+ * Based on acquirewdt.c by Alan Cox,55+ * and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net>66 *77 * This program is free software; you can redistribute it and/or88 * modify it under the terms of the GNU General Public License···1111 *1212 * The authors do NOT admit liability nor provide warranty for1313 * any of this software. This material is provided "AS-IS" in1414- * the hope that it may be useful for others.1414+ * the hope that it may be useful for others.1515 *1616 * (c) Copyright 2001 Scott Jennings <linuxdrivers@oro.net>1717 * 9/27 - 2001 [Initial release]···438438module_exit(sc520_wdt_unload);439439440440MODULE_AUTHOR("Scott and Bill Jennings");441441-MODULE_DESCRIPTION("Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor");441441+MODULE_DESCRIPTION(442442+ "Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor");442443MODULE_LICENSE("GPL");443444MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+15-15
drivers/watchdog/smsc37b787_wdt.c
···22 * SMsC 37B787 Watchdog Timer driver for Linux 2.6.x.x33 *44 * Based on acquirewdt.c by Alan Cox <alan@lxorguk.ukuu.org.uk>55- * and some other existing drivers55+ * and some other existing drivers66 *77 * This program is free software; you can redistribute it and/or88 * modify it under the terms of the GNU General Public License···1111 *1212 * The authors do NOT admit liability nor provide warranty for1313 * any of this software. This material is provided "AS-IS" in1414- * the hope that it may be useful for others.1414+ * the hope that it may be useful for others.1515 *1616 * (C) Copyright 2003-2006 Sven Anders <anders@anduras.de>1717 *···2222 *2323 * Theory of operation:2424 *2525- * A Watchdog Timer (WDT) is a hardware circuit that can2626- * reset the computer system in case of a software fault.2727- * You probably knew that already.2525+ * A Watchdog Timer (WDT) is a hardware circuit that can2626+ * reset the computer system in case of a software fault.2727+ * You probably knew that already.2828 *2929- * Usually a userspace daemon will notify the kernel WDT driver3030- * via the /dev/watchdog special device file that userspace is3131- * still alive, at regular intervals. When such a notification3232- * occurs, the driver will usually tell the hardware watchdog3333- * that everything is in order, and that the watchdog should wait3434- * for yet another little while to reset the system.3535- * If userspace fails (RAM error, kernel bug, whatever), the3636- * notifications cease to occur, and the hardware watchdog will3737- * reset the system (causing a reboot) after the timeout occurs.2929+ * Usually a userspace daemon will notify the kernel WDT driver3030+ * via the /dev/watchdog special device file that userspace is3131+ * still alive, at regular intervals. When such a notification3232+ * occurs, the driver will usually tell the hardware watchdog3333+ * that everything is in order, and that the watchdog should wait3434+ * for yet another little while to reset the system.3535+ * If userspace fails (RAM error, kernel bug, whatever), the3636+ * notifications cease to occur, and the hardware watchdog will3737+ * reset the system (causing a reboot) after the timeout occurs.3838 *3939 * Create device with:4040 * mknod /dev/watchdog c 10 130···485485 case WDIOC_GETTIMEOUT:486486 new_timeout = timeout;487487 if (unit == UNIT_MINUTE)488488- new_timeout *= 60;488488+ new_timeout *= 60;489489 return put_user(new_timeout, uarg.i);490490 default:491491 return -ENOTTY;
+3-2
drivers/watchdog/softdog.c
···11/*22 * SoftDog 0.07: A Software Watchdog Device33 *44- * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, All Rights Reserved.44+ * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,55+ * All Rights Reserved.56 *67 * This program is free software; you can redistribute it and/or78 * modify it under the terms of the GNU General Public License···3332 * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT.3433 *3534 * 20020530 Joel Becker <joel.becker@oracle.com>3636- * Added Matt Domsch's nowayout module option.3535+ * Added Matt Domsch's nowayout module option.3736 */38373938#include <linux/module.h>
···22 * w83697ug/uf WDT driver33 *44 * (c) Copyright 2008 Flemming Fransen <ff@nrvissing.net>55- * reused original code to supoprt w83697ug/uf.55+ * reused original code to support w83697ug/uf.66 *77 * Based on w83627hf_wdt.c which is based on advantechwdt.c88 * which is based on wdt.c.
···1111 *1212 * http://www.cymru.net1313 *1414- * This driver is provided under the GNU General Public License, incorporated1515- * herein by reference. The driver is provided without warranty or1616- * support.1414+ * This driver is provided under the GNU General Public License,1515+ * incorporated herein by reference. The driver is provided without1616+ * warranty or support.1717 *1818 * Release 0.04.1919 *···3939/* programmable outputs: */4040#define WDT_PROGOUT (io+15) /* wr=enable, rd=disable */41414242- /* FAN 501 500 */4343-#define WDC_SR_WCCR 1 /* Active low */ /* X X X */4444-#define WDC_SR_TGOOD 2 /* X X - */4545-#define WDC_SR_ISOI0 4 /* X X X */4646-#define WDC_SR_ISII1 8 /* X X X */4747-#define WDC_SR_FANGOOD 16 /* X - - */4848-#define WDC_SR_PSUOVER 32 /* Active low */ /* X X - */4949-#define WDC_SR_PSUUNDR 64 /* Active low */ /* X X - */5050-#define WDC_SR_IRQ 128 /* Active low */ /* X X X */4242+ /* FAN 501 500 */4343+#define WDC_SR_WCCR 1 /* Active low */ /* X X X */4444+#define WDC_SR_TGOOD 2 /* X X - */4545+#define WDC_SR_ISOI0 4 /* X X X */4646+#define WDC_SR_ISII1 8 /* X X X */4747+#define WDC_SR_FANGOOD 16 /* X - - */4848+#define WDC_SR_PSUOVER 32 /* Active low */ /* X X - */4949+#define WDC_SR_PSUUNDR 64 /* Active low */ /* X X - */5050+#define WDC_SR_IRQ 128 /* Active low */ /* X X X */5151
+1-1
drivers/watchdog/wdt977.c
···401401 return -EFAULT;402402403403 if (wdt977_set_timeout(new_timeout))404404- return -EINVAL;404404+ return -EINVAL;405405406406 wdt977_keepalive();407407 /* Fall */