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

[WATCHDOG] more coding style clean-up's

More coding style clean-up's.

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

+199 -227
+1 -1
drivers/watchdog/Kconfig
··· 463 463 module will be called pc87413_wdt. 464 464 465 465 Most people will say N. 466 - 466 + 467 467 config 60XX_WDT 468 468 tristate "SBC-60XX Watchdog Timer" 469 469 depends on X86
+1 -1
drivers/watchdog/Makefile
··· 92 92 93 93 # MIPS Architecture 94 94 obj-$(CONFIG_INDYDOG) += indydog.o 95 - obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o 95 + obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o 96 96 obj-$(CONFIG_WDT_RM9K_GPI) += rm9k_wdt.o 97 97 obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o 98 98 obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
+1 -1
drivers/watchdog/acquirewdt.c
··· 126 126 if (!nowayout) { 127 127 size_t i; 128 128 /* note: just in case someone wrote the magic character 129 - * five months ago... */ 129 + five months ago... */ 130 130 expect_close = 0; 131 131 /* scan to see whether or not we got the 132 132 magic character */
+9 -8
drivers/watchdog/advantechwdt.c
··· 47 47 #define WATCHDOG_NAME "Advantech WDT" 48 48 #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ 49 49 50 - static struct platform_device *advwdt_platform_device; /* the watchdog platform device */ 50 + /* the watchdog platform device */ 51 + static struct platform_device *advwdt_platform_device; 51 52 static unsigned long advwdt_is_open; 52 53 static char adv_expect_close; 53 54 ··· 121 120 122 121 for (i = 0; i != count; i++) { 123 122 char c; 124 - if (get_user(c, buf+i)) 123 + if (get_user(c, buf + i)) 125 124 return -EFAULT; 126 125 if (c == 'V') 127 126 adv_expect_close = 42; ··· 200 199 return nonseekable_open(inode, file); 201 200 } 202 201 203 - static int 204 - advwdt_close(struct inode *inode, struct file *file) 202 + static int advwdt_close(struct inode *inode, struct file *file) 205 203 { 206 204 if (adv_expect_close == 42) { 207 205 advwdt_disable(); ··· 288 288 static int __devexit advwdt_remove(struct platform_device *dev) 289 289 { 290 290 misc_deregister(&advwdt_miscdev); 291 - release_region(wdt_start,1); 292 - if(wdt_stop != wdt_start) 293 - release_region(wdt_stop,1); 291 + release_region(wdt_start, 1); 292 + if (wdt_stop != wdt_start) 293 + release_region(wdt_stop, 1); 294 294 295 295 return 0; 296 296 } ··· 315 315 { 316 316 int err; 317 317 318 - printk(KERN_INFO "WDT driver for Advantech single board computer initialising.\n"); 318 + printk(KERN_INFO 319 + "WDT driver for Advantech single board computer initialising.\n"); 319 320 320 321 err = platform_driver_register(&advwdt_driver); 321 322 if (err)
+1 -1
drivers/watchdog/alim1535_wdt.c
··· 153 153 the magic character */ 154 154 for (i = 0; i != len; i++) { 155 155 char c; 156 - if (get_user(c, data+i)) 156 + if (get_user(c, data + i)) 157 157 return -EFAULT; 158 158 if (c == 'V') 159 159 ali_expect_release = 42;
+2 -2
drivers/watchdog/alim7101_wdt.c
··· 125 125 126 126 static void wdt_change(int writeval) 127 127 { 128 - char tmp; 128 + char tmp; 129 129 130 130 pci_read_config_byte(alim7101_pmu, ALI_7101_WDT, &tmp); 131 131 if (writeval == WDT_ENABLE) { ··· 198 198 /* now scan */ 199 199 for (ofs = 0; ofs != count; ofs++) { 200 200 char c; 201 - if (get_user(c, buf+ofs)) 201 + if (get_user(c, buf + ofs)) 202 202 return -EFAULT; 203 203 if (c == 'V') 204 204 wdt_expect_close = 42;
+2 -2
drivers/watchdog/ar7_wdt.c
··· 213 213 } 214 214 215 215 static struct notifier_block ar7_wdt_notifier = { 216 - .notifier_call = ar7_wdt_notify_sys 216 + .notifier_call = ar7_wdt_notify_sys, 217 217 }; 218 218 219 219 static ssize_t ar7_wdt_write(struct file *file, const char *data, ··· 230 230 expect_close = 0; 231 231 for (i = 0; i < len; ++i) { 232 232 char c; 233 - if (get_user(c, data+i)) 233 + if (get_user(c, data + i)) 234 234 return -EFAULT; 235 235 if (c == 'V') 236 236 expect_close = 1;
+1 -1
drivers/watchdog/at32ap700x_wdt.c
··· 283 283 */ 284 284 for (i = 0; i != len; i++) { 285 285 char c; 286 - if (get_user(c, data+i)) 286 + if (get_user(c, data + i)) 287 287 return -EFAULT; 288 288 if (c == 'V') 289 289 expect_release = 42;
+3 -5
drivers/watchdog/eurotechwdt.c
··· 210 210 211 211 for (i = 0; i != count; i++) { 212 212 char c; 213 - if (get_user(c, buf+i)) 213 + if (get_user(c, buf + i)) 214 214 return -EFAULT; 215 215 if (c == 'V') 216 216 eur_expect_close = 42; ··· 360 360 static int eurwdt_notify_sys(struct notifier_block *this, unsigned long code, 361 361 void *unused) 362 362 { 363 - if (code == SYS_DOWN || code == SYS_HALT) { 364 - /* Turn the card off */ 365 - eurwdt_disable_timer(); 366 - } 363 + if (code == SYS_DOWN || code == SYS_HALT) 364 + eurwdt_disable_timer(); /* Turn the card off */ 367 365 368 366 return NOTIFY_DONE; 369 367 }
+26 -36
drivers/watchdog/geodewdt.c
··· 77 77 return 0; 78 78 } 79 79 80 - static int 81 - geodewdt_open(struct inode *inode, struct file *file) 80 + static int geodewdt_open(struct inode *inode, struct file *file) 82 81 { 83 - if (test_and_set_bit(WDT_FLAGS_OPEN, &wdt_flags)) 84 - return -EBUSY; 82 + if (test_and_set_bit(WDT_FLAGS_OPEN, &wdt_flags)) 83 + return -EBUSY; 85 84 86 - if (!test_and_clear_bit(WDT_FLAGS_ORPHAN, &wdt_flags)) 87 - __module_get(THIS_MODULE); 85 + if (!test_and_clear_bit(WDT_FLAGS_ORPHAN, &wdt_flags)) 86 + __module_get(THIS_MODULE); 88 87 89 88 geodewdt_ping(); 90 - return nonseekable_open(inode, file); 89 + return nonseekable_open(inode, file); 91 90 } 92 91 93 - static int 94 - geodewdt_release(struct inode *inode, struct file *file) 92 + static int geodewdt_release(struct inode *inode, struct file *file) 95 93 { 96 94 if (safe_close) { 97 95 geodewdt_disable(); 98 96 module_put(THIS_MODULE); 99 - } 100 - else { 97 + } else { 101 98 printk(KERN_CRIT "Unexpected close - watchdog is not stopping.\n"); 102 99 geodewdt_ping(); 103 100 ··· 106 109 return 0; 107 110 } 108 111 109 - static ssize_t 110 - geodewdt_write(struct file *file, const char __user *data, size_t len, 111 - loff_t *ppos) 112 + static ssize_t geodewdt_write(struct file *file, const char __user *data, 113 + size_t len, loff_t *ppos) 112 114 { 113 - if(len) { 115 + if (len) { 114 116 if (!nowayout) { 115 117 size_t i; 116 118 safe_close = 0; ··· 130 134 return len; 131 135 } 132 136 133 - static int 134 - geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 135 - unsigned long arg) 137 + static int geodewdt_ioctl(struct inode *inode, struct file *file, 138 + unsigned int cmd, unsigned long arg) 136 139 { 137 140 void __user *argp = (void __user *)arg; 138 141 int __user *p = argp; ··· 142 147 | WDIOF_MAGICCLOSE, 143 148 .firmware_version = 1, 144 149 .identity = WATCHDOG_NAME, 145 - }; 150 + }; 146 151 147 152 switch (cmd) { 148 153 case WDIOC_GETSUPPORT: ··· 195 200 } 196 201 197 202 static const struct file_operations geodewdt_fops = { 198 - .owner = THIS_MODULE, 199 - .llseek = no_llseek, 200 - .write = geodewdt_write, 201 - .ioctl = geodewdt_ioctl, 202 - .open = geodewdt_open, 203 - .release = geodewdt_release, 203 + .owner = THIS_MODULE, 204 + .llseek = no_llseek, 205 + .write = geodewdt_write, 206 + .ioctl = geodewdt_ioctl, 207 + .open = geodewdt_open, 208 + .release = geodewdt_release, 204 209 }; 205 210 206 211 static struct miscdevice geodewdt_miscdev = { 207 212 .minor = WATCHDOG_MINOR, 208 213 .name = "watchdog", 209 - .fops = &geodewdt_fops 214 + .fops = &geodewdt_fops, 210 215 }; 211 216 212 - static int __devinit 213 - geodewdt_probe(struct platform_device *dev) 217 + static int __devinit geodewdt_probe(struct platform_device *dev) 214 218 { 215 219 int ret, timer; 216 220 ··· 240 246 return ret; 241 247 } 242 248 243 - static int __devexit 244 - geodewdt_remove(struct platform_device *dev) 249 + static int __devexit geodewdt_remove(struct platform_device *dev) 245 250 { 246 251 misc_deregister(&geodewdt_miscdev); 247 252 return 0; 248 253 } 249 254 250 - static void 251 - geodewdt_shutdown(struct platform_device *dev) 255 + static void geodewdt_shutdown(struct platform_device *dev) 252 256 { 253 257 geodewdt_disable(); 254 258 } ··· 261 269 }, 262 270 }; 263 271 264 - static int __init 265 - geodewdt_init(void) 272 + static int __init geodewdt_init(void) 266 273 { 267 274 int ret; 268 275 ··· 281 290 return ret; 282 291 } 283 292 284 - static void __exit 285 - geodewdt_exit(void) 293 + static void __exit geodewdt_exit(void) 286 294 { 287 295 platform_device_unregister(geodewdt_platform_device); 288 296 platform_driver_unregister(&geodewdt_driver);
+2 -2
drivers/watchdog/hpwdt.c
··· 405 405 dmi_walk(dmi_find_cru); 406 406 407 407 /* if cru_rom_addr has been set then we found a CRU service */ 408 - return ((cru_rom_addr != NULL)? 0: -ENODEV); 408 + return ((cru_rom_addr != NULL) ? 0: -ENODEV); 409 409 } 410 410 411 411 /* ------------------------------------------------------------------------- */ ··· 533 533 /* scan to see whether or not we got the magic char. */ 534 534 for (i = 0; i != len; i++) { 535 535 char c; 536 - if (get_user(c, data+i)) 536 + if (get_user(c, data + i)) 537 537 return -EFAULT; 538 538 if (c == 'V') 539 539 expect_release = 42;
+17 -17
drivers/watchdog/i6300esb.c
··· 9 9 * as published by the Free Software Foundation; either version 10 10 * 2 of the License, or (at your option) any later version. 11 11 * 12 - * based on i810-tco.c which is in turn based on softdog.c 12 + * based on i810-tco.c which is in turn based on softdog.c 13 13 * 14 - * The timer is implemented in the following I/O controller hubs: 15 - * (See the intel documentation on http://developer.intel.com.) 16 - * 6300ESB chip : document number 300641-003 14 + * The timer is implemented in the following I/O controller hubs: 15 + * (See the intel documentation on http://developer.intel.com.) 16 + * 6300ESB chip : document number 300641-003 17 17 * 18 18 * 2004YYZZ Ross Biro 19 19 * Initial version 0.01 20 20 * 2004YYZZ Ross Biro 21 - * Version 0.02 21 + * Version 0.02 22 22 * 20050210 David Härdeman <david@2gen.com> 23 - * Ported driver to kernel 2.6 23 + * Ported driver to kernel 2.6 24 24 */ 25 25 26 26 /* ··· 108 108 * reload register. After this the appropriate registers can be written 109 109 * to once before they need to be unlocked again. 110 110 */ 111 - static inline void esb_unlock_registers(void) { 111 + static inline void esb_unlock_registers(void) 112 + { 112 113 writeb(ESB_UNLOCK1, ESB_RELOAD_REG); 113 114 writeb(ESB_UNLOCK2, ESB_RELOAD_REG); 114 115 } ··· 170 169 171 170 /* Write timer 2 */ 172 171 esb_unlock_registers(); 173 - writel(val, ESB_TIMER2_REG); 172 + writel(val, ESB_TIMER2_REG); 174 173 175 174 /* Reload */ 176 175 esb_unlock_registers(); ··· 197 196 } 198 197 199 198 /* 200 - * /dev/watchdog handling 199 + * /dev/watchdog handling 201 200 */ 202 201 203 202 static int esb_open(struct inode *inode, struct file *file) ··· 243 242 /* scan to see whether or not we got the magic character */ 244 243 for (i = 0; i != len; i++) { 245 244 char c; 246 - if (get_user(c, data+i)) 245 + if (get_user(c, data + i)) 247 246 return -EFAULT; 248 247 if (c == 'V') 249 248 esb_expect_close = 42; ··· 263 262 void __user *argp = (void __user *)arg; 264 263 int __user *p = argp; 265 264 static struct watchdog_info ident = { 266 - .options = WDIOF_SETTIMEOUT | 265 + .options = WDIOF_SETTIMEOUT | 267 266 WDIOF_KEEPALIVEPING | 268 267 WDIOF_MAGICCLOSE, 269 - .firmware_version = 0, 270 - .identity = ESB_MODULE_NAME, 268 + .firmware_version = 0, 269 + .identity = ESB_MODULE_NAME, 271 270 }; 272 271 273 272 switch (cmd) { ··· 325 324 static int esb_notify_sys(struct notifier_block *this, 326 325 unsigned long code, void *unused) 327 326 { 328 - if (code == SYS_DOWN || code == SYS_HALT) { 329 - /* Turn the WDT off */ 330 - esb_timer_stop(); 331 - } 327 + if (code == SYS_DOWN || code == SYS_HALT) 328 + esb_timer_stop(); /* Turn the WDT off */ 329 + 332 330 return NOTIFY_DONE; 333 331 } 334 332
+5 -5
drivers/watchdog/iTCO_vendor_support.c
··· 18 18 */ 19 19 20 20 /* Module and version information */ 21 - #define DRV_NAME "iTCO_vendor_support" 22 - #define DRV_VERSION "1.01" 23 - #define DRV_RELDATE "11-Nov-2006" 21 + #define DRV_NAME "iTCO_vendor_support" 22 + #define DRV_VERSION "1.01" 23 + #define DRV_RELDATE "11-Nov-2006" 24 24 #define PFX DRV_NAME ": " 25 25 26 26 /* Includes */ ··· 37 37 38 38 /* iTCO defines */ 39 39 #define SMI_EN acpibase + 0x30 /* SMI Control and Enable Register */ 40 - #define TCOBASE acpibase + 0x60 /* TCO base address */ 41 - #define TCO1_STS TCOBASE + 0x04 /* TCO1 Status Register */ 40 + #define TCOBASE acpibase + 0x60 /* TCO base address */ 41 + #define TCO1_STS TCOBASE + 0x04 /* TCO1 Status Register */ 42 42 43 43 /* List of vendor support modes */ 44 44 /* SuperMicro Pentium 3 Era 370SSE+-OEM1/P3TSSE */
+5 -5
drivers/watchdog/iTCO_wdt.c
··· 55 55 */ 56 56 57 57 /* Module and version information */ 58 - #define DRV_NAME "iTCO_wdt" 59 - #define DRV_VERSION "1.03" 60 - #define DRV_RELDATE "30-Apr-2008" 58 + #define DRV_NAME "iTCO_wdt" 59 + #define DRV_VERSION "1.03" 60 + #define DRV_RELDATE "30-Apr-2008" 61 61 #define PFX DRV_NAME ": " 62 62 63 63 /* Includes */ ··· 107 107 TCO_ICH9, /* ICH9 */ 108 108 TCO_ICH9R, /* ICH9R */ 109 109 TCO_ICH9DH, /* ICH9DH */ 110 - TCO_ICH9DO, /* ICH9DO */ 110 + TCO_ICH9DO, /* ICH9DO */ 111 111 TCO_631XESB, /* 631xESB/632xESB */ 112 112 }; 113 113 ··· 497 497 magic character */ 498 498 for (i = 0; i != len; i++) { 499 499 char c; 500 - if (get_user(c, data+i)) 500 + if (get_user(c, data + i)) 501 501 return -EFAULT; 502 502 if (c == 'V') 503 503 expect_release = 42;
+4 -8
drivers/watchdog/ib700wdt.c
··· 129 129 * Watchdog Operations 130 130 */ 131 131 132 - static void 133 - ibwdt_ping(void) 132 + static void ibwdt_ping(void) 134 133 { 135 134 spin_lock(&ibwdt_lock); 136 135 ··· 139 140 spin_unlock(&ibwdt_lock); 140 141 } 141 142 142 - static void 143 - ibwdt_disable(void) 143 + static void ibwdt_disable(void) 144 144 { 145 145 spin_lock(&ibwdt_lock); 146 146 outb_p(0, WDT_STOP); 147 147 spin_unlock(&ibwdt_lock); 148 148 } 149 149 150 - static int 151 - ibwdt_set_heartbeat(int t) 150 + static int ibwdt_set_heartbeat(int t) 152 151 { 153 152 int i; 154 153 ··· 260 263 return nonseekable_open(inode, file); 261 264 } 262 265 263 - static int 264 - ibwdt_close(struct inode *inode, struct file *file) 266 + static int ibwdt_close(struct inode *inode, struct file *file) 265 267 { 266 268 if (expect_close == 42) { 267 269 ibwdt_disable();
+2 -2
drivers/watchdog/ibmasr.c
··· 275 275 static const struct watchdog_info ident = { 276 276 .options = WDIOF_KEEPALIVEPING | 277 277 WDIOF_MAGICCLOSE, 278 - .identity = "IBM ASR" 278 + .identity = "IBM ASR", 279 279 }; 280 280 void __user *argp = (void __user *)arg; 281 281 int __user *p = argp; ··· 345 345 346 346 static const struct file_operations asr_fops = { 347 347 .owner = THIS_MODULE, 348 - .llseek = no_llseek, 348 + .llseek = no_llseek, 349 349 .write = asr_write, 350 350 .unlocked_ioctl = asr_ioctl, 351 351 .open = asr_open,
+1 -1
drivers/watchdog/iop_wdt.c
··· 241 241 with an open */ 242 242 ret = misc_register(&iop_wdt_miscdev); 243 243 if (ret == 0) 244 - printk("iop watchdog timer: timeout %lu sec\n", 244 + printk(KERN_INFO "iop watchdog timer: timeout %lu sec\n", 245 245 iop_watchdog_timeout()); 246 246 247 247 return ret;
+1 -1
drivers/watchdog/it8712f_wdt.c
··· 221 221 expect_close = 0; 222 222 for (i = 0; i < len; ++i) { 223 223 char c; 224 - if (get_user(c, data+i)) 224 + if (get_user(c, data + i)) 225 225 return -EFAULT; 226 226 if (c == 'V') 227 227 expect_close = 42;
+6 -7
drivers/watchdog/ixp4xx_wdt.c
··· 157 157 } 158 158 159 159 160 - static const struct file_operations ixp4xx_wdt_fops = 161 - { 160 + static const struct file_operations ixp4xx_wdt_fops = { 162 161 .owner = THIS_MODULE, 163 162 .llseek = no_llseek, 164 163 .write = ixp4xx_wdt_write, ··· 166 167 .release = ixp4xx_wdt_release, 167 168 }; 168 169 169 - static struct miscdevice ixp4xx_wdt_miscdev = 170 - { 170 + static struct miscdevice ixp4xx_wdt_miscdev = { 171 171 .minor = WATCHDOG_MINOR, 172 172 .name = "watchdog", 173 173 .fops = &ixp4xx_wdt_fops, ··· 179 181 180 182 asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :); 181 183 if (!(processor_id & 0xf) && !cpu_is_ixp46x()) { 182 - printk("IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected - " 183 - "watchdog disabled\n"); 184 + printk(KERN_ERR "IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected" 185 + " - watchdog disabled\n"); 184 186 185 187 return -ENODEV; 186 188 } ··· 189 191 WDIOF_CARDRESET : 0; 190 192 ret = misc_register(&ixp4xx_wdt_miscdev); 191 193 if (ret == 0) 192 - printk("IXP4xx Watchdog Timer: heartbeat %d sec\n", heartbeat); 194 + printk(KERN_INFO "IXP4xx Watchdog Timer: heartbeat %d sec\n", 195 + heartbeat); 193 196 return ret; 194 197 } 195 198
+3 -3
drivers/watchdog/mpc5200_wdt.c
··· 164 164 static const struct file_operations mpc5200_wdt_fops = { 165 165 .owner = THIS_MODULE, 166 166 .write = mpc5200_wdt_write, 167 - .ioctl = mpc5200_wdt_ioctl, 167 + .unlocked_ioctl = mpc5200_wdt_ioctl, 168 168 .open = mpc5200_wdt_open, 169 169 .release = mpc5200_wdt_release, 170 170 }; ··· 219 219 return 0; 220 220 221 221 iounmap(wdt->regs); 222 - out_release: 222 + out_release: 223 223 release_mem_region(wdt->mem.start, size); 224 - out_free: 224 + out_free: 225 225 kfree(wdt); 226 226 return err; 227 227 }
+4 -4
drivers/watchdog/mpcore_wdt.c
··· 377 377 378 378 return 0; 379 379 380 - err_irq: 380 + err_irq: 381 381 misc_deregister(&mpcore_wdt_miscdev); 382 - err_misc: 382 + err_misc: 383 383 iounmap(wdt->base); 384 - err_free: 384 + err_free: 385 385 kfree(wdt); 386 - err_out: 386 + err_out: 387 387 return ret; 388 388 } 389 389
+2 -2
drivers/watchdog/mtx-1_wdt.c
··· 191 191 .unlocked_ioctl = mtx1_wdt_ioctl, 192 192 .open = mtx1_wdt_open, 193 193 .write = mtx1_wdt_write, 194 - .release = mtx1_wdt_release 194 + .release = mtx1_wdt_release, 195 195 }; 196 196 197 197 198 198 static struct miscdevice mtx1_wdt_misc = { 199 199 .minor = WATCHDOG_MINOR, 200 200 .name = "watchdog", 201 - .fops = &mtx1_wdt_fops 201 + .fops = &mtx1_wdt_fops, 202 202 }; 203 203 204 204
+1 -1
drivers/watchdog/omap_wdt.c
··· 245 245 static struct miscdevice omap_wdt_miscdev = { 246 246 .minor = WATCHDOG_MINOR, 247 247 .name = "watchdog", 248 - .fops = &omap_wdt_fops 248 + .fops = &omap_wdt_fops, 249 249 }; 250 250 251 251 static int __init omap_wdt_probe(struct platform_device *pdev)
+19 -19
drivers/watchdog/pc87413_wdt.c
··· 38 38 39 39 /* #define DEBUG 1 */ 40 40 41 - #define DEFAULT_TIMEOUT 1 /* 1 minute */ 41 + #define DEFAULT_TIMEOUT 1 /* 1 minute */ 42 42 #define MAX_TIMEOUT 255 43 43 44 44 #define VERSION "1.1" ··· 46 46 #define PFX MODNAME ": " 47 47 #define DPFX MODNAME " - DEBUG: " 48 48 49 - #define WDT_INDEX_IO_PORT (io+0) /* I/O port base (index register) */ 49 + #define WDT_INDEX_IO_PORT (io+0) /* I/O port base (index register) */ 50 50 #define WDT_DATA_IO_PORT (WDT_INDEX_IO_PORT+1) 51 51 #define SWC_LDN 0x04 52 - #define SIOCFG2 0x22 /* Serial IO register */ 53 - #define WDCTL 0x10 /* Watchdog-Timer-Controll-Register */ 54 - #define WDTO 0x11 /* Watchdog timeout register */ 55 - #define WDCFG 0x12 /* Watchdog config register */ 52 + #define SIOCFG2 0x22 /* Serial IO register */ 53 + #define WDCTL 0x10 /* Watchdog-Timer-Controll-Register */ 54 + #define WDTO 0x11 /* Watchdog timeout register */ 55 + #define WDCFG 0x12 /* Watchdog config register */ 56 56 57 - static int io = 0x2E; /* Address used on Portwell Boards */ 57 + static int io = 0x2E; /* Address used on Portwell Boards */ 58 58 59 - static int timeout = DEFAULT_TIMEOUT; /* timeout value */ 59 + static int timeout = DEFAULT_TIMEOUT; /* timeout value */ 60 60 static unsigned long timer_enabled; /* is the timer enabled? */ 61 61 62 62 static char expect_close; /* is the close expected? */ ··· 99 99 100 100 /* Step 2: Enable SWC functions */ 101 101 102 - outb_p(0x07, WDT_INDEX_IO_PORT); /* Point SWC_LDN (LDN=4) */ 102 + outb_p(0x07, WDT_INDEX_IO_PORT); /* Point SWC_LDN (LDN=4) */ 103 103 outb_p(SWC_LDN, WDT_DATA_IO_PORT); 104 104 105 - outb_p(0x30, WDT_INDEX_IO_PORT); /* Read Index 0x30 First */ 105 + outb_p(0x30, WDT_INDEX_IO_PORT); /* Read Index 0x30 First */ 106 106 cr_data = inb(WDT_DATA_IO_PORT); 107 - cr_data |= 0x01; /* Set Bit0 to 1 */ 107 + cr_data |= 0x01; /* Set Bit0 to 1 */ 108 108 outb_p(0x30, WDT_INDEX_IO_PORT); 109 - outb_p(cr_data, WDT_DATA_IO_PORT); /* Index0x30_bit0P1 */ 109 + outb_p(cr_data, WDT_DATA_IO_PORT); /* Index0x30_bit0P1 */ 110 110 111 111 #ifdef DEBUG 112 112 printk(KERN_INFO DPFX "pc87413 - Enable SWC functions\n"); ··· 122 122 123 123 /* Step 3: Read SWC I/O Base Address */ 124 124 125 - outb_p(0x60, WDT_INDEX_IO_PORT); /* Read Index 0x60 */ 125 + outb_p(0x60, WDT_INDEX_IO_PORT); /* Read Index 0x60 */ 126 126 addr_h = inb(WDT_DATA_IO_PORT); 127 127 128 - outb_p(0x61, WDT_INDEX_IO_PORT); /* Read Index 0x61 */ 128 + outb_p(0x61, WDT_INDEX_IO_PORT); /* Read Index 0x61 */ 129 129 130 130 addr_l = inb(WDT_DATA_IO_PORT); 131 131 ··· 374 374 magic character */ 375 375 for (i = 0; i != len; i++) { 376 376 char c; 377 - if (get_user(c, data+i)) 377 + if (get_user(c, data + i)) 378 378 return -EFAULT; 379 379 if (c == 'V') 380 380 expect_close = 42; ··· 413 413 WDIOF_SETTIMEOUT | 414 414 WDIOF_MAGICCLOSE, 415 415 .firmware_version = 1, 416 - .identity = "PC87413(HF/F) watchdog" 416 + .identity = "PC87413(HF/F) watchdog", 417 417 }; 418 418 419 419 uarg.i = (int __user *)arg; ··· 507 507 static struct miscdevice pc87413_miscdev = { 508 508 .minor = WATCHDOG_MINOR, 509 509 .name = "watchdog", 510 - .fops = &pc87413_fops 510 + .fops = &pc87413_fops, 511 511 }; 512 512 513 513 /* -- Module init functions -------------------------------------*/ ··· 567 567 568 568 misc_deregister(&pc87413_miscdev); 569 569 unregister_reboot_notifier(&pc87413_notifier); 570 - /* release_region(io,2); */ 570 + /* release_region(io, 2); */ 571 571 572 - printk(MODNAME " watchdog component driver removed.\n"); 572 + printk(KERN_INFO MODNAME " watchdog component driver removed.\n"); 573 573 } 574 574 575 575 module_init(pc87413_init);
+3 -3
drivers/watchdog/pcwd.c
··· 145 145 #define CMD_ISA_RESET_RELAYS 0x0D 146 146 147 147 /* Watchdog's Dip Switch heartbeat values */ 148 - static const int heartbeat_tbl [] = { 148 + static const int heartbeat_tbl[] = { 149 149 20, /* OFF-OFF-OFF = 20 Sec */ 150 150 40, /* OFF-OFF-ON = 40 Sec */ 151 151 60, /* OFF-ON-OFF = 1 Min */ ··· 272 272 printk(KERN_DEBUG PFX "command_mode=%d\n", 273 273 pcwd_private.command_mode); 274 274 275 - return(found); 275 + return found; 276 276 } 277 277 278 278 static void unset_command_mode(void) ··· 325 325 } 326 326 327 327 unset_command_mode(); 328 - return(option_switches); 328 + return option_switches; 329 329 } 330 330 331 331 static void pcwd_show_card_info(void)
+12 -16
drivers/watchdog/pcwd_pci.c
··· 96 96 #define CMD_GET_CLEAR_RESET_COUNT 0x84 97 97 98 98 /* Watchdog's Dip Switch heartbeat values */ 99 - static const int heartbeat_tbl [] = { 99 + static const int heartbeat_tbl[] = { 100 100 5, /* OFF-OFF-OFF = 5 Sec */ 101 101 10, /* OFF-OFF-ON = 10 Sec */ 102 102 30, /* OFF-ON-OFF = 30 Sec */ ··· 219 219 int option_switches; 220 220 221 221 got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor); 222 - if (got_fw_rev) { 222 + if (got_fw_rev) 223 223 sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor); 224 - } else { 224 + else 225 225 sprintf(fw_ver_str, "<card no answer>"); 226 - } 227 226 228 227 /* Get switch settings */ 229 228 option_switches = pcipcwd_get_option_switches(); ··· 329 330 { 330 331 int control_status; 331 332 332 - *status=0; 333 + *status = 0; 333 334 control_status = inb_p(pcipcwd_private.io_addr + 1); 334 335 if (control_status & WD_PCI_WTRP) 335 336 *status |= WDIOF_CARDRESET; ··· 367 368 outb_p((control_status & WD_PCI_R2DS) | WD_PCI_WTRP, pcipcwd_private.io_addr + 1); 368 369 369 370 /* clear reset counter */ 370 - msb=0; 371 - reset_counter=0xff; 371 + msb = 0; 372 + reset_counter = 0xff; 372 373 send_command(CMD_GET_CLEAR_RESET_COUNT, &msb, &reset_counter); 373 374 374 375 if (debug >= DEBUG) { ··· 440 441 /* scan to see whether or not we got the magic character */ 441 442 for (i = 0; i != len; i++) { 442 443 char c; 443 - if(get_user(c, data+i)) 444 + if (get_user(c, data + i)) 444 445 return -EFAULT; 445 446 if (c == 'V') 446 447 expect_release = 42; ··· 470 471 471 472 switch (cmd) { 472 473 case WDIOC_GETSUPPORT: 473 - return copy_to_user(argp, &ident, 474 - sizeof (ident)) ? -EFAULT : 0; 474 + return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; 475 475 476 476 case WDIOC_GETSTATUS: 477 477 { ··· 496 498 { 497 499 int new_options, retval = -EINVAL; 498 500 499 - if (get_user (new_options, p)) 501 + if (get_user(new_options, p)) 500 502 return -EFAULT; 501 503 502 504 if (new_options & WDIOS_DISABLECARD) { ··· 598 600 if (pcipcwd_get_temperature(&temperature)) 599 601 return -EFAULT; 600 602 601 - if (copy_to_user (data, &temperature, 1)) 603 + if (copy_to_user(data, &temperature, 1)) 602 604 return -EFAULT; 603 605 604 606 return 1; ··· 623 625 624 626 static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused) 625 627 { 626 - if (code==SYS_DOWN || code==SYS_HALT) { 627 - /* Turn the WDT off */ 628 - pcipcwd_stop(); 629 - } 628 + if (code == SYS_DOWN || code == SYS_HALT) 629 + pcipcwd_stop(); /* Turn the WDT off */ 630 630 631 631 return NOTIFY_DONE; 632 632 }
+29 -32
drivers/watchdog/pcwd_usb.c
··· 87 87 #define USB_PCWD_PRODUCT_ID 0x1140 88 88 89 89 /* table of devices that work with this driver */ 90 - static struct usb_device_id usb_pcwd_table [] = { 90 + static struct usb_device_id usb_pcwd_table[] = { 91 91 { USB_DEVICE(USB_PCWD_VENDOR_ID, USB_PCWD_PRODUCT_ID) }, 92 92 { } /* Terminating entry */ 93 93 }; ··· 109 109 #define CMD_DISABLE_WATCHDOG CMD_ENABLE_WATCHDOG 110 110 111 111 /* Watchdog's Dip Switch heartbeat values */ 112 - static const int heartbeat_tbl [] = { 112 + static const int heartbeat_tbl[] = { 113 113 5, /* OFF-OFF-OFF = 5 Sec */ 114 114 10, /* OFF-OFF-ON = 10 Sec */ 115 115 30, /* OFF-ON-OFF = 30 Sec */ ··· 129 129 130 130 /* Structure to hold all of our device specific stuff */ 131 131 struct usb_pcwd_private { 132 - struct usb_device * udev; /* save off the usb device pointer */ 133 - struct usb_interface * interface; /* the interface for this device */ 132 + struct usb_device *udev; /* save off the usb device pointer */ 133 + struct usb_interface *interface; /* the interface for this device */ 134 134 135 135 unsigned int interface_number; /* the interface number used for cmd's */ 136 136 137 - unsigned char * intr_buffer; /* the buffer to intr data */ 137 + unsigned char *intr_buffer; /* the buffer to intr data */ 138 138 dma_addr_t intr_dma; /* the dma address for the intr buffer */ 139 139 size_t intr_size; /* the size of the intr buffer */ 140 - struct urb * intr_urb; /* the urb used for the intr pipe */ 140 + struct urb *intr_urb; /* the urb used for the intr pipe */ 141 141 142 142 unsigned char cmd_command; /* The command that is reported back */ 143 143 unsigned char cmd_data_msb; /* The data MSB that is reported back */ ··· 153 153 static DEFINE_MUTEX(disconnect_mutex); 154 154 155 155 /* local function prototypes */ 156 - static int usb_pcwd_probe (struct usb_interface *interface, const struct usb_device_id *id); 157 - static void usb_pcwd_disconnect (struct usb_interface *interface); 156 + static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_device_id *id); 157 + static void usb_pcwd_disconnect(struct usb_interface *interface); 158 158 159 159 /* usb specific object needed to register this driver with the usb subsystem */ 160 160 static struct usb_driver usb_pcwd_driver = { ··· 194 194 usb_pcwd->cmd_data_lsb = data[2]; 195 195 196 196 /* notify anyone waiting that the cmd has finished */ 197 - atomic_set (&usb_pcwd->cmd_received, 1); 197 + atomic_set(&usb_pcwd->cmd_received, 1); 198 198 199 199 resubmit: 200 - retval = usb_submit_urb (urb, GFP_ATOMIC); 200 + retval = usb_submit_urb(urb, GFP_ATOMIC); 201 201 if (retval) 202 202 printk(KERN_ERR PFX "can't resubmit intr, usb_submit_urb failed with result %d\n", 203 203 retval); ··· 223 223 dbg("sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x", 224 224 buf[0], buf[1], buf[2]); 225 225 226 - atomic_set (&usb_pcwd->cmd_received, 0); 226 + atomic_set(&usb_pcwd->cmd_received, 0); 227 227 228 228 if (usb_control_msg(usb_pcwd->udev, usb_sndctrlpipe(usb_pcwd->udev, 0), 229 229 HID_REQ_SET_REPORT, HID_DT_REPORT, ··· 236 236 got_response = 0; 237 237 for (count = 0; (count < USB_COMMAND_TIMEOUT) && (!got_response); count++) { 238 238 mdelay(1); 239 - if (atomic_read (&usb_pcwd->cmd_received)) 239 + if (atomic_read(&usb_pcwd->cmd_received)) 240 240 got_response = 1; 241 241 } 242 242 ··· 355 355 /* scan to see whether or not we got the magic character */ 356 356 for (i = 0; i != len; i++) { 357 357 char c; 358 - if(get_user(c, data+i)) 358 + if (get_user(c, data + i)) 359 359 return -EFAULT; 360 360 if (c == 'V') 361 361 expect_release = 42; ··· 383 383 384 384 switch (cmd) { 385 385 case WDIOC_GETSUPPORT: 386 - return copy_to_user(argp, &ident, 387 - sizeof (ident)) ? -EFAULT : 0; 386 + return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; 388 387 389 388 case WDIOC_GETSTATUS: 390 389 case WDIOC_GETBOOTSTATUS: ··· 403 404 { 404 405 int new_options, retval = -EINVAL; 405 406 406 - if (get_user (new_options, p)) 407 + if (get_user(new_options, p)) 407 408 return -EFAULT; 408 409 409 410 if (new_options & WDIOS_DISABLECARD) { ··· 517 518 518 519 static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused) 519 520 { 520 - if (code==SYS_DOWN || code==SYS_HALT) { 521 - /* Turn the WDT off */ 522 - usb_pcwd_stop(usb_pcwd_device); 523 - } 521 + if (code == SYS_DOWN || code == SYS_HALT) 522 + usb_pcwd_stop(usb_pcwd_device); /* Turn the WDT off */ 524 523 525 524 return NOTIFY_DONE; 526 525 } ··· 563 566 /** 564 567 * usb_pcwd_delete 565 568 */ 566 - static inline void usb_pcwd_delete (struct usb_pcwd_private *usb_pcwd) 569 + static inline void usb_pcwd_delete(struct usb_pcwd_private *usb_pcwd) 567 570 { 568 571 usb_free_urb(usb_pcwd->intr_urb); 569 572 if (usb_pcwd->intr_buffer != NULL) 570 573 usb_buffer_free(usb_pcwd->udev, usb_pcwd->intr_size, 571 574 usb_pcwd->intr_buffer, usb_pcwd->intr_dma); 572 - kfree (usb_pcwd); 575 + kfree(usb_pcwd); 573 576 } 574 577 575 578 /** ··· 622 625 maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); 623 626 624 627 /* allocate memory for our device and initialize it */ 625 - usb_pcwd = kzalloc (sizeof(struct usb_pcwd_private), GFP_KERNEL); 628 + usb_pcwd = kzalloc(sizeof(struct usb_pcwd_private), GFP_KERNEL); 626 629 if (usb_pcwd == NULL) { 627 630 printk(KERN_ERR PFX "Out of memory\n"); 628 631 goto error; ··· 637 640 usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ? le16_to_cpu(endpoint->wMaxPacketSize) : 8); 638 641 639 642 /* set up the memory buffer's */ 640 - if (!(usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, GFP_ATOMIC, &usb_pcwd->intr_dma))) { 643 + usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, GFP_ATOMIC, &usb_pcwd->intr_dma); 644 + if (!usb_pcwd->intr_buffer) { 641 645 printk(KERN_ERR PFX "Out of memory\n"); 642 646 goto error; 643 647 } ··· 672 674 673 675 /* Get the Firmware Version */ 674 676 got_fw_rev = usb_pcwd_send_command(usb_pcwd, CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor); 675 - if (got_fw_rev) { 677 + if (got_fw_rev) 676 678 sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor); 677 - } else { 679 + else 678 680 sprintf(fw_ver_str, "<card no answer>"); 679 - } 680 681 681 682 printk(KERN_INFO PFX "Found card (Firmware: %s) with temp option\n", 682 683 fw_ver_str); ··· 721 724 } 722 725 723 726 /* we can register the device now, as it is ready */ 724 - usb_set_intfdata (interface, usb_pcwd); 727 + usb_set_intfdata(interface, usb_pcwd); 725 728 726 729 printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n", 727 730 heartbeat, nowayout); ··· 755 758 /* prevent races with open() */ 756 759 mutex_lock(&disconnect_mutex); 757 760 758 - usb_pcwd = usb_get_intfdata (interface); 759 - usb_set_intfdata (interface, NULL); 761 + usb_pcwd = usb_get_intfdata(interface); 762 + usb_set_intfdata(interface, NULL); 760 763 761 764 mutex_lock(&usb_pcwd->mtx); 762 765 ··· 816 819 } 817 820 818 821 819 - module_init (usb_pcwd_init); 820 - module_exit (usb_pcwd_exit); 822 + module_init(usb_pcwd_init); 823 + module_exit(usb_pcwd_exit);
+6 -7
drivers/watchdog/rm9k_wdt.c
··· 234 234 return 0; 235 235 } 236 236 237 - static ssize_t 238 - wdt_gpi_write(struct file *f, const char __user *d, size_t s, loff_t *o) 237 + static ssize_t wdt_gpi_write(struct file *f, const char __user *d, size_t s, 238 + loff_t *o) 239 239 { 240 240 char val; 241 241 ··· 325 325 326 326 327 327 /* Shutdown notifier */ 328 - static int 329 - wdt_gpi_notify(struct notifier_block *this, unsigned long code, void *unused) 328 + static int wdt_gpi_notify(struct notifier_block *this, unsigned long code, 329 + void *unused) 330 330 { 331 331 if (code == SYS_DOWN || code == SYS_HALT) 332 332 wdt_gpi_stop(); ··· 336 336 337 337 338 338 /* Init & exit procedures */ 339 - static const struct resource * 340 - wdt_gpi_get_resource(struct platform_device *pdv, const char *name, 341 - unsigned int type) 339 + static const struct resource *wdt_gpi_get_resource(struct platform_device *pdv, 340 + const char *name, unsigned int type) 342 341 { 343 342 char buf[80]; 344 343 if (snprintf(buf, sizeof buf, "%s_0", name) >= sizeof buf)
+2 -2
drivers/watchdog/sb_wdog.c
··· 215 215 /* 216 216 * Notifier for system down 217 217 */ 218 - static int 219 - sbwdog_notify_sys(struct notifier_block *this, unsigned long code, void *erf) 218 + static int sbwdog_notify_sys(struct notifier_block *this, unsigned long code, 219 + void *erf) 220 220 { 221 221 if (code == SYS_DOWN || code == SYS_HALT) { 222 222 /*
+2 -2
drivers/watchdog/sbc60xxwdt.c
··· 183 183 magic character */ 184 184 for (ofs = 0; ofs != count; ofs++) { 185 185 char c; 186 - if (get_user(c, buf+ofs)) 186 + if (get_user(c, buf + ofs)) 187 187 return -EFAULT; 188 188 if (c == 'V') 189 189 wdt_expect_close = 42; ··· 238 238 239 239 switch (cmd) { 240 240 case WDIOC_GETSUPPORT: 241 - return copy_to_user(argp, &ident, sizeof(ident))? -EFAULT : 0; 241 + return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; 242 242 case WDIOC_GETSTATUS: 243 243 case WDIOC_GETBOOTSTATUS: 244 244 return put_user(0, p);
+1 -1
drivers/watchdog/sc1200wdt.c
··· 279 279 for (i = 0; i != len; i++) { 280 280 char c; 281 281 282 - if (get_user(c, data+i)) 282 + if (get_user(c, data + i)) 283 283 return -EFAULT; 284 284 if (c == 'V') 285 285 expect_close = 42;
+1 -1
drivers/watchdog/scx200_wdt.c
··· 143 143 expect_close = 0; 144 144 for (i = 0; i < len; ++i) { 145 145 char c; 146 - if (get_user(c, data+i)) 146 + if (get_user(c, data + i)) 147 147 return -EFAULT; 148 148 if (c == 'V') 149 149 expect_close = 42;
+2 -2
drivers/watchdog/smsc37b787_wdt.c
··· 408 408 magic character */ 409 409 for (i = 0; i != len; i++) { 410 410 char c; 411 - if (get_user(c, data+i)) 411 + if (get_user(c, data + i)) 412 412 return -EFAULT; 413 413 if (c == 'V') 414 414 expect_close = 42; ··· 438 438 WDIOF_SETTIMEOUT | 439 439 WDIOF_MAGICCLOSE, 440 440 .firmware_version = 0, 441 - .identity = "SMsC 37B787 Watchdog" 441 + .identity = "SMsC 37B787 Watchdog", 442 442 }; 443 443 444 444 uarg.i = (int __user *)arg;
+1 -1
drivers/watchdog/txx9wdt.c
··· 190 190 }; 191 191 192 192 static struct notifier_block txx9wdt_notifier = { 193 - .notifier_call = txx9wdt_notify_sys 193 + .notifier_call = txx9wdt_notify_sys, 194 194 }; 195 195 196 196 static int __init txx9wdt_probe(struct platform_device *dev)
+4 -5
drivers/watchdog/w83627hf_wdt.c
··· 180 180 181 181 for (i = 0; i != count; i++) { 182 182 char c; 183 - if (get_user(c, buf+i)) 183 + if (get_user(c, buf + i)) 184 184 return -EFAULT; 185 185 if (c == 'V') 186 186 expect_close = 42; ··· 278 278 static int wdt_notify_sys(struct notifier_block *this, unsigned long code, 279 279 void *unused) 280 280 { 281 - if (code == SYS_DOWN || code == SYS_HALT) { 282 - /* Turn the WDT off */ 283 - wdt_disable(); 284 - } 281 + if (code == SYS_DOWN || code == SYS_HALT) 282 + wdt_disable(); /* Turn the WDT off */ 283 + 285 284 return NOTIFY_DONE; 286 285 } 287 286
+5 -6
drivers/watchdog/w83697hf_wdt.c
··· 218 218 219 219 for (i = 0; i != count; i++) { 220 220 char c; 221 - if (get_user(c, buf+i)) 221 + if (get_user(c, buf + i)) 222 222 return -EFAULT; 223 223 if (c == 'V') 224 224 expect_close = 42; ··· 325 325 static int wdt_notify_sys(struct notifier_block *this, unsigned long code, 326 326 void *unused) 327 327 { 328 - if (code == SYS_DOWN || code == SYS_HALT) { 329 - /* Turn the WDT off */ 330 - wdt_disable(); 331 - } 328 + if (code == SYS_DOWN || code == SYS_HALT) 329 + wdt_disable(); /* Turn the WDT off */ 330 + 332 331 return NOTIFY_DONE; 333 332 } 334 333 ··· 413 414 w83697hf_init(); 414 415 if (early_disable) { 415 416 if (wdt_running()) 416 - printk (KERN_WARNING PFX "Stopping previously enabled watchdog until userland kicks in\n"); 417 + printk(KERN_WARNING PFX "Stopping previously enabled watchdog until userland kicks in\n"); 417 418 wdt_disable(); 418 419 } 419 420
+9 -11
drivers/watchdog/wafer5823wdt.c
··· 1 1 /* 2 2 * ICP Wafer 5823 Single Board Computer WDT driver 3 - * http://www.icpamerica.com/wafer_5823.php 4 - * May also work on other similar models 3 + * http://www.icpamerica.com/wafer_5823.php 4 + * May also work on other similar models 5 5 * 6 6 * (c) Copyright 2002 Justin Cormack <justin@street-vision.com> 7 7 * 8 - * Release 0.02 8 + * Release 0.02 9 9 * 10 10 * Based on advantechwdt.c which is based on wdt.c. 11 11 * Original copyright messages: ··· 50 50 /* 51 51 * You must set these - there is no sane way to probe for this board. 52 52 * 53 - * To enable, write the timeout value in seconds (1 to 255) to I/O 54 - * port WDT_START, then read the port to start the watchdog. To pat 55 - * the dog, read port WDT_STOP to stop the timer, then read WDT_START 56 - * to restart it again. 53 + * To enable, write the timeout value in seconds (1 to 255) to I/O 54 + * port WDT_START, then read the port to start the watchdog. To pat 55 + * the dog, read port WDT_STOP to stop the timer, then read WDT_START 56 + * to restart it again. 57 57 */ 58 58 59 59 static int wdt_stop = 0x843; ··· 87 87 inb_p(wdt_start); 88 88 } 89 89 90 - static void 91 - wafwdt_stop(void) 90 + static void wafwdt_stop(void) 92 91 { 93 92 /* stop watchdog */ 94 93 inb_p(wdt_stop); ··· 198 199 return nonseekable_open(inode, file); 199 200 } 200 201 201 - static int 202 - wafwdt_close(struct inode *inode, struct file *file) 202 + static int wafwdt_close(struct inode *inode, struct file *file) 203 203 { 204 204 if (expect_close == 42) 205 205 wafwdt_stop();
+1 -1
drivers/watchdog/wd501p.h
··· 12 12 * http://www.cymru.net 13 13 * 14 14 * This driver is provided under the GNU General Public License, incorporated 15 - * herein by reference. The driver is provided without warranty or 15 + * herein by reference. The driver is provided without warranty or 16 16 * support. 17 17 * 18 18 * Release 0.04.
+1 -1
drivers/watchdog/wdrtas.c
··· 313 313 static struct watchdog_info wdinfo = { 314 314 .options = WDRTAS_SUPPORTED_MASK, 315 315 .firmware_version = 0, 316 - .identity = "wdrtas" 316 + .identity = "wdrtas", 317 317 }; 318 318 319 319 switch (cmd) {
+1 -1
drivers/watchdog/wdt_pci.c
··· 381 381 382 382 for (i = 0; i != count; i++) { 383 383 char c; 384 - if (get_user(c, buf+i)) 384 + if (get_user(c, buf + i)) 385 385 return -EFAULT; 386 386 if (c == 'V') 387 387 expect_close = 42;