aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/alim1535_wdt.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2009-03-18 04:35:09 -0400
committerWim Van Sebroeck <wim@iguana.be>2009-03-25 05:07:04 -0400
commit143a2e54bf53216674eada16e8953f48b159e08a (patch)
tree009497fad6a7d28aae80f490007ce78736afb82c /drivers/watchdog/alim1535_wdt.c
parentd5c26a597782d4109869abbcc36983969f964864 (diff)
[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>
Diffstat (limited to 'drivers/watchdog/alim1535_wdt.c')
-rw-r--r--drivers/watchdog/alim1535_wdt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index 2a7690ecf97d..937a80fb61e1 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -60,7 +60,7 @@ static void ali_start(void)
60 60
61 pci_read_config_dword(ali_pci, 0xCC, &val); 61 pci_read_config_dword(ali_pci, 0xCC, &val);
62 val &= ~0x3F; /* Mask count */ 62 val &= ~0x3F; /* Mask count */
63 val |= (1<<25) | ali_timeout_bits; 63 val |= (1 << 25) | ali_timeout_bits;
64 pci_write_config_dword(ali_pci, 0xCC, val); 64 pci_write_config_dword(ali_pci, 0xCC, val);
65 65
66 spin_unlock(&ali_lock); 66 spin_unlock(&ali_lock);
@@ -79,8 +79,8 @@ static void ali_stop(void)
79 spin_lock(&ali_lock); 79 spin_lock(&ali_lock);
80 80
81 pci_read_config_dword(ali_pci, 0xCC, &val); 81 pci_read_config_dword(ali_pci, 0xCC, &val);
82 val &= ~0x3F; /* Mask count to zero (disabled) */ 82 val &= ~0x3F; /* Mask count to zero (disabled) */
83 val &= ~(1<<25);/* and for safety mask the reset enable */ 83 val &= ~(1 << 25); /* and for safety mask the reset enable */
84 pci_write_config_dword(ali_pci, 0xCC, val); 84 pci_write_config_dword(ali_pci, 0xCC, val);
85 85
86 spin_unlock(&ali_lock); 86 spin_unlock(&ali_lock);
@@ -89,7 +89,7 @@ static void ali_stop(void)
89/* 89/*
90 * ali_keepalive - send a keepalive to the watchdog 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
95static void ali_keepalive(void) 95static void ali_keepalive(void)
@@ -109,11 +109,11 @@ static int ali_settimer(int t)
109 if (t < 0) 109 if (t < 0)
110 return -EINVAL; 110 return -EINVAL;
111 else if (t < 60) 111 else if (t < 60)
112 ali_timeout_bits = t|(1<<6); 112 ali_timeout_bits = t|(1 << 6);
113 else if (t < 3600) 113 else if (t < 3600)
114 ali_timeout_bits = (t/60)|(1<<7); 114 ali_timeout_bits = (t / 60)|(1 << 7);
115 else if (t < 18000) 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 else 117 else
118 return -EINVAL; 118 return -EINVAL;
119 119
@@ -138,7 +138,7 @@ static int ali_settimer(int t)
138 */ 138 */
139 139
140static ssize_t ali_write(struct file *file, const char __user *data, 140static 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 /* See if we got the magic character 'V' and reload the timer */ 143 /* See if we got the magic character 'V' and reload the timer */
144 if (len) { 144 if (len) {
@@ -348,9 +348,9 @@ static int __init ali_find_watchdog(void)
348 /* Timer bits */ 348 /* Timer bits */
349 wdog &= ~0x3F; 349 wdog &= ~0x3F;
350 /* Issued events */ 350 /* Issued events */
351 wdog &= ~((1<<27)|(1<<26)|(1<<25)|(1<<24)); 351 wdog &= ~((1 << 27)|(1 << 26)|(1 << 25)|(1 << 24));
352 /* No monitor bits */ 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 pci_write_config_dword(pdev, 0xCC, wdog); 355 pci_write_config_dword(pdev, 0xCC, wdog);
356 356