Commit 143a2e54 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

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

Some more cleaning-up of the watchdog drivers.
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent d5c26a59
...@@ -138,7 +138,9 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -138,7 +138,9 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
int __user *p = argp; int __user *p = argp;
static struct watchdog_info ident = { static struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE, .options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
.firmware_version = 1, .firmware_version = 1,
.identity = WATCHDOG_NAME, .identity = WATCHDOG_NAME,
}; };
...@@ -259,7 +261,8 @@ static int __devinit advwdt_probe(struct platform_device *dev) ...@@ -259,7 +261,8 @@ static int __devinit advwdt_probe(struct platform_device *dev)
goto unreg_stop; goto unreg_stop;
} }
/* Check that the heartbeat value is within it's range ; if not reset to the default */ /* Check that the heartbeat value is within it's range ;
* if not reset to the default */
if (advwdt_set_heartbeat(timeout)) { if (advwdt_set_heartbeat(timeout)) {
advwdt_set_heartbeat(WATCHDOG_TIMEOUT); advwdt_set_heartbeat(WATCHDOG_TIMEOUT);
printk(KERN_INFO PFX printk(KERN_INFO PFX
......
...@@ -60,7 +60,7 @@ static void ali_start(void) ...@@ -60,7 +60,7 @@ static void ali_start(void)
pci_read_config_dword(ali_pci, 0xCC, &val); pci_read_config_dword(ali_pci, 0xCC, &val);
val &= ~0x3F; /* Mask count */ val &= ~0x3F; /* Mask count */
val |= (1<<25) | ali_timeout_bits; val |= (1 << 25) | ali_timeout_bits;
pci_write_config_dword(ali_pci, 0xCC, val); pci_write_config_dword(ali_pci, 0xCC, val);
spin_unlock(&ali_lock); spin_unlock(&ali_lock);
...@@ -80,7 +80,7 @@ static void ali_stop(void) ...@@ -80,7 +80,7 @@ static void ali_stop(void)
pci_read_config_dword(ali_pci, 0xCC, &val); pci_read_config_dword(ali_pci, 0xCC, &val);
val &= ~0x3F; /* Mask count to zero (disabled) */ val &= ~0x3F; /* Mask count to zero (disabled) */
val &= ~(1<<25);/* and for safety mask the reset enable */ val &= ~(1 << 25); /* and for safety mask the reset enable */
pci_write_config_dword(ali_pci, 0xCC, val); pci_write_config_dword(ali_pci, 0xCC, val);
spin_unlock(&ali_lock); spin_unlock(&ali_lock);
...@@ -109,11 +109,11 @@ static int ali_settimer(int t) ...@@ -109,11 +109,11 @@ static int ali_settimer(int t)
if (t < 0) if (t < 0)
return -EINVAL; return -EINVAL;
else if (t < 60) else if (t < 60)
ali_timeout_bits = t|(1<<6); ali_timeout_bits = t|(1 << 6);
else if (t < 3600) else if (t < 3600)
ali_timeout_bits = (t/60)|(1<<7); ali_timeout_bits = (t / 60)|(1 << 7);
else if (t < 18000) else if (t < 18000)
ali_timeout_bits = (t/300)|(1<<6)|(1<<7); ali_timeout_bits = (t / 300)|(1 << 6)|(1 << 7);
else else
return -EINVAL; return -EINVAL;
...@@ -348,9 +348,9 @@ static int __init ali_find_watchdog(void) ...@@ -348,9 +348,9 @@ static int __init ali_find_watchdog(void)
/* Timer bits */ /* Timer bits */
wdog &= ~0x3F; wdog &= ~0x3F;
/* Issued events */ /* Issued events */
wdog &= ~((1<<27)|(1<<26)|(1<<25)|(1<<24)); wdog &= ~((1 << 27)|(1 << 26)|(1 << 25)|(1 << 24));
/* No monitor bits */ /* No monitor bits */
wdog &= ~((1<<16)|(1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<9)); wdog &= ~((1 << 16)|(1 << 13)|(1 << 12)|(1 << 11)|(1 << 10)|(1 << 9));
pci_write_config_dword(pdev, 0xCC, wdog); pci_write_config_dword(pdev, 0xCC, wdog);
......
...@@ -355,7 +355,8 @@ static int __init alim7101_wdt_init(void) ...@@ -355,7 +355,8 @@ static int __init alim7101_wdt_init(void)
alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,
NULL); NULL);
if (!alim7101_pmu) { if (!alim7101_pmu) {
printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n"); printk(KERN_INFO PFX
"ALi M7101 PMU not present - WDT not set\n");
return -EBUSY; return -EBUSY;
} }
...@@ -399,7 +400,8 @@ static int __init alim7101_wdt_init(void) ...@@ -399,7 +400,8 @@ static int __init alim7101_wdt_init(void)
rc = misc_register(&wdt_miscdev); rc = misc_register(&wdt_miscdev);
if (rc) { if (rc) {
printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", printk(KERN_ERR PFX
"cannot register miscdev on minor=%d (err=%d)\n",
wdt_miscdev.minor, rc); wdt_miscdev.minor, rc);
goto err_out_reboot; goto err_out_reboot;
} }
......
...@@ -151,7 +151,7 @@ static void eurwdt_activate_timer(void) ...@@ -151,7 +151,7 @@ static void eurwdt_activate_timer(void)
if (irq == 0) if (irq == 0)
printk(KERN_INFO ": interrupt disabled\n"); printk(KERN_INFO ": interrupt disabled\n");
eurwdt_write_reg(WDT_TIMER_CFG, irq<<4); eurwdt_write_reg(WDT_TIMER_CFG, irq << 4);
eurwdt_write_reg(WDT_UNIT_SEL, WDT_UNIT_SECS); /* we use seconds */ eurwdt_write_reg(WDT_UNIT_SEL, WDT_UNIT_SECS); /* we use seconds */
eurwdt_set_timeout(0); /* the default timeout */ eurwdt_set_timeout(0); /* the default timeout */
......
...@@ -34,11 +34,15 @@ ...@@ -34,11 +34,15 @@
static int timeout = WATCHDOG_TIMEOUT; static int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, int, 0); module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=131, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) "."); MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1<= timeout <=131, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
static int nowayout = WATCHDOG_NOWAYOUT; static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0); module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
static struct platform_device *geodewdt_platform_device; static struct platform_device *geodewdt_platform_device;
static unsigned long wdt_flags; static unsigned long wdt_flags;
...@@ -269,7 +273,8 @@ static int __init geodewdt_init(void) ...@@ -269,7 +273,8 @@ static int __init geodewdt_init(void)
if (ret) if (ret)
return ret; return ret;
geodewdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0); geodewdt_platform_device = platform_device_register_simple(DRV_NAME,
-1, NULL, 0);
if (IS_ERR(geodewdt_platform_device)) { if (IS_ERR(geodewdt_platform_device)) {
ret = PTR_ERR(geodewdt_platform_device); ret = PTR_ERR(geodewdt_platform_device);
goto err; goto err;
......
...@@ -137,7 +137,8 @@ static struct pci_device_id hpwdt_devices[] = { ...@@ -137,7 +137,8 @@ static struct pci_device_id hpwdt_devices[] = {
}; };
MODULE_DEVICE_TABLE(pci, hpwdt_devices); MODULE_DEVICE_TABLE(pci, hpwdt_devices);
extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs, unsigned long *pRomEntry); extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
unsigned long *pRomEntry);
#ifndef CONFIG_X86_64 #ifndef CONFIG_X86_64
/* --32 Bit Bios------------------------------------------------------------ */ /* --32 Bit Bios------------------------------------------------------------ */
......
...@@ -240,7 +240,8 @@ static ssize_t esb_write(struct file *file, const char __user *data, ...@@ -240,7 +240,8 @@ static ssize_t esb_write(struct file *file, const char __user *data,
* five months ago... */ * five months ago... */
esb_expect_close = 0; esb_expect_close = 0;
/* scan to see whether or not we got the magic character */ /* scan to see whether or not we got the
* magic character */
for (i = 0; i != len; i++) { for (i = 0; i != len; i++) {
char c; char c;
if (get_user(c, data + i)) if (get_user(c, data + i))
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
static int vendorsupport; static int vendorsupport;
module_param(vendorsupport, int, 0); module_param(vendorsupport, int, 0);
MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default=0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+"); MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default="
"0 (none), 1=SuperMicro Pent3, 2=SuperMicro Pent4+");
/* /*
* Vendor Specific Support * Vendor Specific Support
...@@ -305,7 +306,8 @@ static void __exit iTCO_vendor_exit_module(void) ...@@ -305,7 +306,8 @@ static void __exit iTCO_vendor_exit_module(void)
module_init(iTCO_vendor_init_module); module_init(iTCO_vendor_init_module);
module_exit(iTCO_vendor_exit_module); module_exit(iTCO_vendor_exit_module);
MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, R. Seretny <lkpatches@paypc.com>"); MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>, "
"R. Seretny <lkpatches@paypc.com>");
MODULE_DESCRIPTION("Intel TCO Vendor Specific WatchDog Timer Driver Support"); MODULE_DESCRIPTION("Intel TCO Vendor Specific WatchDog Timer Driver Support");
MODULE_VERSION(DRV_VERSION); MODULE_VERSION(DRV_VERSION);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -273,7 +273,9 @@ static struct platform_device *iTCO_wdt_platform_device; ...@@ -273,7 +273,9 @@ static struct platform_device *iTCO_wdt_platform_device;
#define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */ #define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */
static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */ static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */
module_param(heartbeat, int, 0); module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<heartbeat<39 (TCO v1) or 613 (TCO v2), default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "
"(2<heartbeat<39 (TCO v1) or 613 (TCO v2), default="
__MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
static int nowayout = WATCHDOG_NOWAYOUT; static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0); module_param(nowayout, int, 0);
...@@ -346,7 +348,8 @@ static int iTCO_wdt_start(void) ...@@ -346,7 +348,8 @@ static int iTCO_wdt_start(void)
/* disable chipset's NO_REBOOT bit */ /* disable chipset's NO_REBOOT bit */
if (iTCO_wdt_unset_NO_REBOOT_bit()) { if (iTCO_wdt_unset_NO_REBOOT_bit()) {
spin_unlock(&iTCO_wdt_private.io_lock); spin_unlock(&iTCO_wdt_private.io_lock);
printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n"); printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, "
"reboot disabled by hardware\n");
return -EIO; return -EIO;
} }
...@@ -669,7 +672,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, ...@@ -669,7 +672,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
/* Check chipset's NO_REBOOT bit */ /* Check chipset's NO_REBOOT bit */
if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) { if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) {
printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n"); printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, "
"reboot disabled by hardware\n");
ret = -ENODEV; /* Cannot reset NO_REBOOT bit */ ret = -ENODEV; /* Cannot reset NO_REBOOT bit */
goto out; goto out;
} }
...@@ -716,8 +720,9 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, ...@@ -716,8 +720,9 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
if not reset to the default */ if not reset to the default */
if (iTCO_wdt_set_heartbeat(heartbeat)) { if (iTCO_wdt_set_heartbeat(heartbeat)) {
iTCO_wdt_set_heartbeat(WATCHDOG_HEARTBEAT); iTCO_wdt_set_heartbeat(WATCHDOG_HEARTBEAT);
printk(KERN_INFO PFX "heartbeat value must be 2 < heartbeat < 39 (TCO v1) or 613 (TCO v2), using %d\n", printk(KERN_INFO PFX
heartbeat); "heartbeat value must be 2 < heartbeat < 39 (TCO v1) "
"or 613 (TCO v2), using %d\n", heartbeat);
} }
ret = misc_register(&iTCO_wdt_miscdev); ret = misc_register(&iTCO_wdt_miscdev);
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#include <asm/mpc52xx.h> #include <asm/mpc52xx.h>
#define GPT_MODE_WDT (1<<15) #define GPT_MODE_WDT (1 << 15)
#define GPT_MODE_CE (1<<12) #define GPT_MODE_CE (1 << 12)
#define GPT_MODE_MS_TIMER (0x4) #define GPT_MODE_MS_TIMER (0x4)
......
...@@ -536,7 +536,8 @@ static int __init pc87413_init(void) ...@@ -536,7 +536,8 @@ static int __init pc87413_init(void)
ret = misc_register(&pc87413_miscdev); ret = misc_register(&pc87413_miscdev);
if (ret != 0) { if (ret != 0) {
printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", printk(KERN_ERR PFX
"cannot register miscdev on minor=%d (err=%d)\n",
WATCHDOG_MINOR, ret); WATCHDOG_MINOR, ret);
unregister_reboot_notifier(&pc87413_notifier); unregister_reboot_notifier(&pc87413_notifier);
return ret; return ret;
...@@ -574,7 +575,8 @@ static void __exit pc87413_exit(void) ...@@ -574,7 +575,8 @@ static void __exit pc87413_exit(void)
module_init(pc87413_init); module_init(pc87413_init);
module_exit(pc87413_exit); module_exit(pc87413_exit);
MODULE_AUTHOR("Sven Anders <anders@anduras.de>, Marcus Junker <junker@anduras.de>,"); MODULE_AUTHOR("Sven Anders <anders@anduras.de>, "
"Marcus Junker <junker@anduras.de>,");
MODULE_DESCRIPTION("PC87413 WDT driver"); MODULE_DESCRIPTION("PC87413 WDT driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -76,8 +76,7 @@ ...@@ -76,8 +76,7 @@
#define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog" #define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog"
#define WATCHDOG_NAME "pcwd" #define WATCHDOG_NAME "pcwd"
#define PFX WATCHDOG_NAME ": " #define PFX WATCHDOG_NAME ": "
#define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n" #define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION "\n"
#define WD_VER WATCHDOG_VERSION " (" WATCHDOG_DATE ")"
/* /*
* It should be noted that PCWD_REVISION_B was removed because A and B * It should be noted that PCWD_REVISION_B was removed because A and B
...@@ -200,7 +199,9 @@ MODULE_PARM_DESC(debug, ...@@ -200,7 +199,9 @@ MODULE_PARM_DESC(debug,
#define WATCHDOG_HEARTBEAT 0 #define WATCHDOG_HEARTBEAT 0
static int heartbeat = WATCHDOG_HEARTBEAT; static int heartbeat = WATCHDOG_HEARTBEAT;
module_param(heartbeat, int, 0); module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "
"(2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default="
__MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
static int nowayout = WATCHDOG_NOWAYOUT; static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0); module_param(nowayout, int, 0);
...@@ -239,7 +240,8 @@ static int send_isa_command(int cmd) ...@@ -239,7 +240,8 @@ static int send_isa_command(int cmd)
} }
if (debug >= DEBUG) if (debug >= DEBUG)
printk(KERN_DEBUG PFX "received following data for cmd=0x%02x: port0=0x%02x last_port0=0x%02x\n", printk(KERN_DEBUG PFX "received following data for "
"cmd=0x%02x: port0=0x%02x last_port0=0x%02x\n",
cmd, port0, last_port0); cmd, port0, last_port0);
return port0; return port0;
...@@ -339,10 +341,12 @@ static void pcwd_show_card_info(void) ...@@ -339,10 +341,12 @@ static void pcwd_show_card_info(void)
pcwd_private.io_addr); pcwd_private.io_addr);
else if (pcwd_private.revision == PCWD_REVISION_C) { else if (pcwd_private.revision == PCWD_REVISION_C) {
pcwd_get_firmware(); pcwd_get_firmware();
printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n", printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port "
"0x%04x (Firmware version: %s)\n",
pcwd_private.io_addr, pcwd_private.fw_ver_str); pcwd_private.io_addr, pcwd_private.fw_ver_str);
option_switches = pcwd_get_option_switches(); option_switches = pcwd_get_option_switches();
printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", printk(KERN_INFO PFX "Option switches (0x%02x): "
"Temperature Reset Enable=%s, Power On Delay=%s\n",
option_switches, option_switches,
((option_switches & 0x10) ? "ON" : "OFF"), ((option_switches & 0x10) ? "ON" : "OFF"),
((option_switches & 0x08) ? "ON" : "OFF")); ((option_switches & 0x08) ? "ON" : "OFF"));
...@@ -358,7 +362,8 @@ static void pcwd_show_card_info(void) ...@@ -358,7 +362,8 @@ static void pcwd_show_card_info(void)
printk(KERN_INFO PFX "Temperature Option Detected\n"); printk(KERN_INFO PFX "Temperature Option Detected\n");
if (pcwd_private.boot_status & WDIOF_CARDRESET) if (pcwd_private.boot_status & WDIOF_CARDRESET)
printk(KERN_INFO PFX "Previous reboot was caused by the card\n"); printk(KERN_INFO PFX
"Previous reboot was caused by the card\n");
if (pcwd_private.boot_status & WDIOF_OVERHEAT) { if (pcwd_private.boot_status & WDIOF_OVERHEAT) {
printk(KERN_EMERG PFX printk(KERN_EMERG PFX
...@@ -871,7 +876,7 @@ static int __devinit pcwd_isa_probe(struct device *dev, unsigned int id) ...@@ -871,7 +876,7 @@ static int __devinit pcwd_isa_probe(struct device *dev, unsigned int id)
cards_found++; cards_found++;
if (cards_found == 1) if (cards_found == 1)
printk(KERN_INFO PFX "v%s Ken Hollis (kenji@bitgate.com)\n", printk(KERN_INFO PFX "v%s Ken Hollis (kenji@bitgate.com)\n",
WD_VER); WATCHDOG_VERSION);
if (cards_found > 1) { if (cards_found > 1) {
printk(KERN_ERR PFX "This driver only supports 1 device\n"); printk(KERN_ERR PFX "This driver only supports 1 device\n");
...@@ -1026,7 +1031,8 @@ static void __exit pcwd_cleanup_module(void) ...@@ -1026,7 +1031,8 @@ static void __exit pcwd_cleanup_module(void)
module_init(pcwd_init_module); module_init(pcwd_init_module);
module_exit(pcwd_cleanup_module); module_exit(pcwd_cleanup_module);
MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, Wim Van Sebroeck <wim@iguana.be>"); MODULE_AUTHOR("Ken Hollis <kenji@bitgate.com>, "
"Wim Van Sebroeck <wim@iguana.be>");
MODULE_DESCRIPTION("Berkshire ISA-PC Watchdog driver"); MODULE_DESCRIPTION("Berkshire ISA-PC Watchdog driver");
MODULE_VERSION(WATCHDOG_VERSION); MODULE_VERSION(WATCHDOG_VERSION);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
This diff is collapsed.
This diff is collapsed.
...@@ -54,22 +54,22 @@ ...@@ -54,22 +54,22 @@
/* WDTIM_CTRL bit definitions */ /* WDTIM_CTRL bit definitions */
#define COUNT_ENAB 1 #define COUNT_ENAB 1
#define RESET_COUNT (1<<1) #define RESET_COUNT (1 << 1)
#define DEBUG_EN (1<<2) #define DEBUG_EN (1 << 2)
/* WDTIM_MCTRL bit definitions */ /* WDTIM_MCTRL bit definitions */
#define MR0_INT 1 #define MR0_INT 1
#undef RESET_COUNT0 #undef RESET_COUNT0
#define RESET_COUNT0 (1<<2) #define RESET_COUNT0 (1 << 2)
#define STOP_COUNT0 (1<<2) #define STOP_COUNT0 (1 << 2)
#define M_RES1 (1<<3) #define M_RES1 (1 << 3)
#define M_RES2 (1<<4) #define M_RES2 (1 << 4)
#define RESFRC1 (1<<5) #define RESFRC1 (1 << 5)
#define RESFRC2 (1<<6) #define RESFRC2 (1 << 6)
/* WDTIM_EMR bit definitions */ /* WDTIM_EMR bit definitions */
#define EXT_MATCH0 1 #define EXT_MATCH0 1
#define MATCH_OUTPUT_HIGH (2<<4) /*a MATCH_CTRL setting */ #define MATCH_OUTPUT_HIGH (2 << 4) /*a MATCH_CTRL setting */
/* WDTIM_RES bit definitions */ /* WDTIM_RES bit definitions */
#define WDOG_RESET 1 /* read only */ #define WDOG_RESET 1 /* read only */
......
...@@ -146,7 +146,8 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -146,7 +146,8 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
return 0; return 0;
} }
static ssize_t riowd_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) static ssize_t riowd_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{ {
struct riowd *p = riowd_device; struct riowd *p = riowd_device;
......
...@@ -35,7 +35,8 @@ static int epx_c3_alive; ...@@ -35,7 +35,8 @@ static int epx_c3_alive;
static int nowayout = WATCHDOG_NOWAYOUT; static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0); module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
#define EPXC3_WATCHDOG_CTL_REG 0x1ee /* write 1 to enable, 0 to disable */ #define EPXC3_WATCHDOG_CTL_REG 0x1ee /* write 1 to enable, 0 to disable */
#define EPXC3_WATCHDOG_PET_REG 0x1ef /* write anything to pet once enabled */ #define EPXC3_WATCHDOG_PET_REG 0x1ef /* write anything to pet once enabled */
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
#define UART2_IRQ 0x04 /* Serial1 */ #define UART2_IRQ 0x04 /* Serial1 */
/* 5 -7 are reserved */ /* 5 -7 are reserved */
static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER; static char banner[] __initdata = PFX SC1200_MODULE_VER;
static int timeout = 1; static int timeout = 1;
static int io = -1; static int io = -1;
static int io_len = 2; /* for non plug and play */ static int io_len = 2; /* for non plug and play */
...@@ -392,7 +392,7 @@ static int __init sc1200wdt_init(void) ...@@ -392,7 +392,7 @@ static int __init sc1200wdt_init(void)
{ {
int ret; int ret;
printk("%s\n", banner); printk(KERN_INFO "%s\n", banner);
#if defined CONFIG_PNP #if defined CONFIG_PNP
if (isapnp) { if (isapnp) {
...@@ -477,6 +477,7 @@ module_init(sc1200wdt_init); ...@@ -477,6 +477,7 @@ module_init(sc1200wdt_init);
module_exit(sc1200wdt_exit); module_exit(sc1200wdt_exit);
MODULE_AUTHOR("Zwane Mwaikambo <zwane@commfireservices.com>"); MODULE_AUTHOR("Zwane Mwaikambo <zwane@commfireservices.com>");
MODULE_DESCRIPTION("Driver for National Semiconductor PC87307/PC97307 watchdog component"); MODULE_DESCRIPTION(
"Driver for National Semiconductor PC87307/PC97307 watchdog component");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
...@@ -438,6 +438,7 @@ module_init(sc520_wdt_init); ...@@ -438,6 +438,7 @@ module_init(sc520_wdt_init);
module_exit(sc520_wdt_unload); module_exit(sc520_wdt_unload);
MODULE_AUTHOR("Scott and Bill Jennings"); MODULE_AUTHOR("Scott and Bill Jennings");
MODULE_DESCRIPTION("Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor"); MODULE_DESCRIPTION(
"Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
/* /*
* SoftDog 0.07: A Software Watchdog Device * SoftDog 0.07: A Software Watchdog Device
* *
* (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, All Rights Reserved. * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
* All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
......
...@@ -462,6 +462,7 @@ module_init(wdt_init); ...@@ -462,6 +462,7 @@ module_init(wdt_init);
module_exit(wdt_exit); module_exit(wdt_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marcus Junker <junker@anduras.de>, Samuel Tardieu <sam@rfc1149.net>"); MODULE_AUTHOR("Marcus Junker <junker@anduras.de>, "
"Samuel Tardieu <sam@rfc1149.net>");
MODULE_DESCRIPTION("w83697hf/hg WDT driver"); MODULE_DESCRIPTION("w83697hf/hg WDT driver");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* w83697ug/uf WDT driver * w83697ug/uf WDT driver
* *
* (c) Copyright 2008 Flemming Fransen <ff@nrvissing.net> * (c) Copyright 2008 Flemming Fransen <ff@nrvissing.net>
* reused original code to supoprt w83697ug/uf. * reused original code to support w83697ug/uf.
* *
* Based on w83627hf_wdt.c which is based on advantechwdt.c * Based on w83627hf_wdt.c which is based on advantechwdt.c
* which is based on wdt.c. * which is based on wdt.c.
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
* *
* http://www.cymru.net * http://www.cymru.net
* *
* This driver is provided under the GNU General Public License, incorporated * This driver is provided under the GNU General Public License,
* herein by reference. The driver is provided without warranty or * incorporated herein by reference. The driver is provided without
* support. * warranty or support.
* *
* Release 0.04. * Release 0.04.
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment