Skip to contentSkip to conversation

improve machzwd detection.

PATCH Dave Jones 1 participant 1 message Aug 1, 2006 Char and misc drivers

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

On a machine with no machzwd, loading the module prints out..

machzwd: MachZ ZF-Logic Watchdog driver initializing. 0xffff
machzwd: Watchdog using action = RESET

- the 0xffff printk is unnecessary
- 0xffff seems to be 'hardware not present'
- fix CodingStyle. (This driver could use some more work here)

drivers/char/watchdog/machzwd.c renamed from drivers/char/watchdog/machzwd.c~ +1 -2
@@ -427,8 +427,7 @@ static int __init zf_init(void)
 	printk(KERN_INFO PFX ": MachZ ZF-Logic Watchdog driver initializing.\n");
 
 	ret = zf_get_ZFL_version();
-	printk("%#x\n", ret);
-	if((!ret) || (ret != 0xffff)){
+	if ((!ret) || (ret == 0xffff)) {
 		printk(KERN_WARNING PFX ": no ZF-Logic found\n");
 		return -ENODEV;
 	}
Signature · 1 line
http://www.codemonkey.org.uk