watchdog: fix several MODULE_PARM_DESC strings
[safe/jmp/linux-2.6] / drivers / watchdog / cpwd.c
index 0c14586..d62b9ce 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/timer.h>
+#include <linux/slab.h>
 #include <linux/smp_lock.h>
 #include <linux/io.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/uaccess.h>
 
 #include <asm/irq.h>
-#include <asm/uaccess.h>
-
 #include <asm/watchdog.h>
 
 #define DRIVER_NAME    "cpwd"
@@ -155,9 +155,9 @@ static struct cpwd *cpwd_device;
 
 static struct timer_list cpwd_timer;
 
-static int wd0_timeout = 0;
-static int wd1_timeout = 0;
-static int wd2_timeout = 0;
+static int wd0_timeout;
+static int wd1_timeout;
+static int wd2_timeout;
 
 module_param(wd0_timeout, int, 0);
 MODULE_PARM_DESC(wd0_timeout, "Default watchdog0 timeout in 1/10secs");
@@ -404,7 +404,7 @@ static int cpwd_release(struct inode *inode, struct file *file)
 
 static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-       static struct watchdog_info info = {
+       static const struct watchdog_info info = {
                .options                = WDIOF_SETTIMEOUT,
                .firmware_version       = 1,
                .identity               = DRIVER_NAME,
@@ -577,7 +577,7 @@ static int __devinit cpwd_probe(struct of_device *op,
         * interrupt_mask register cannot be written, so no timer
         * interrupts can be masked within the PLD.
         */
-       str_prop = of_get_property(op->node, "model", NULL);
+       str_prop = of_get_property(op->dev.of_node, "model", NULL);
        p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL));
 
        if (!p->enabled)
@@ -677,8 +677,11 @@ static const struct of_device_id cpwd_match[] = {
 MODULE_DEVICE_TABLE(of, cpwd_match);
 
 static struct of_platform_driver cpwd_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = cpwd_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = cpwd_match,
+       },
        .probe          = cpwd_probe,
        .remove         = __devexit_p(cpwd_remove),
 };