Source
563
563
prop_val = of_get_property(options, "watchdog-enable?", NULL);
564
564
p->enabled = (prop_val ? true : false);
565
565
566
566
prop_val = of_get_property(options, "watchdog-reboot?", NULL);
567
567
p->reboot = (prop_val ? true : false);
568
568
569
569
str_prop = of_get_property(options, "watchdog-timeout", NULL);
570
570
if (str_prop)
571
571
p->timeout = simple_strtoul(str_prop, NULL, 10);
572
572
573
+
of_node_put(options);
574
+
573
575
/* CP1400s seem to have broken PLD implementations-- the
574
576
* interrupt_mask register cannot be written, so no timer
575
577
* interrupts can be masked within the PLD.
576
578
*/
577
579
str_prop = of_get_property(op->dev.of_node, "model", NULL);
578
580
p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL));
579
581
580
582
if (!p->enabled)
581
583
cpwd_toggleintr(p, -1, WD_INTR_OFF);
582
584