patch-2.4.2 linux/drivers/char/softdog.c

Next file: linux/drivers/char/stallion.c
Previous file: linux/drivers/char/sh-sci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/char/softdog.c linux/drivers/char/softdog.c
@@ -45,9 +45,7 @@
 
 static int soft_margin = TIMER_MARGIN;	/* in seconds */
 
-#ifdef MODULE
 MODULE_PARM(soft_margin,"i");
-#endif
 
 /*
  *	Our timer
@@ -129,14 +127,10 @@
 static int softdog_ioctl(struct inode *inode, struct file *file,
 	unsigned int cmd, unsigned long arg)
 {
-	static struct watchdog_info ident=
-	{
-		0,
-		0,
-		"Software Watchdog"
+	static struct watchdog_info ident = {
+		identity: "Software Watchdog",
 	};
-	switch(cmd)
-	{
+	switch (cmd) {
 		default:
 			return -ENOIOCTLCMD;
 		case WDIOC_GETSUPPORT:
@@ -152,8 +146,7 @@
 	}
 }
 
-static struct file_operations softdog_fops=
-{
+static struct file_operations softdog_fops = {
 	owner:		THIS_MODULE,
 	write:		softdog_write,
 	ioctl:		softdog_ioctl,
@@ -161,13 +154,14 @@
 	release:	softdog_release,
 };
 
-static struct miscdevice softdog_miscdev=
-{
-	WATCHDOG_MINOR,
-	"watchdog",
-	&softdog_fops
+static struct miscdevice softdog_miscdev = {
+	minor:		WATCHDOG_MINOR,
+	name:		"watchdog",
+	fops:		&softdog_fops,
 };
 
+static const char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.05, timer margin: %d sec\n";
+
 static int __init watchdog_init(void)
 {
 	int ret;
@@ -177,10 +171,10 @@
 	if (ret)
 		return ret;
 
-	printk("Software Watchdog Timer: 0.05, timer margin: %d sec\n", soft_margin);
+	printk(banner, soft_margin);
 
 	return 0;
-}	
+}
 
 static void __exit watchdog_exit(void)
 {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)