Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63518
b: refs/heads/master
c: d37a5c3
h: refs/heads/master
v: v3
  • Loading branch information
Dale Farnsworth authored and Wim Van Sebroeck committed Jul 24, 2007
1 parent ef2b0cc commit 659412f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85d57238d2ff9d95892dd1f266b85d2359d48dcc
refs/heads/master: d37a5c3ddf7f57fdc0632e279eabb1772f89dfc5
12 changes: 9 additions & 3 deletions trunk/drivers/char/watchdog/mv64x60_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ static void __iomem *mv64x60_wdt_regs;
static int mv64x60_wdt_timeout;
static unsigned int bus_clk;

static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");

static void mv64x60_wdt_reg_write(u32 val)
{
/* Allow write only to CTL1 / CTL2 fields, retaining values in
Expand Down Expand Up @@ -100,6 +104,9 @@ static int mv64x60_wdt_open(struct inode *inode, struct file *file)
if (test_and_set_bit(MV64x60_WDOG_FLAG_OPENED, &wdt_flags))
return -EBUSY;

if (nowayout)
__module_get(THIS_MODULE);

mv64x60_wdt_service();
mv64x60_wdt_handler_enable();

Expand All @@ -110,9 +117,8 @@ static int mv64x60_wdt_release(struct inode *inode, struct file *file)
{
mv64x60_wdt_service();

#if !defined(CONFIG_WATCHDOG_NOWAYOUT)
mv64x60_wdt_handler_disable();
#endif
if (!nowayout)
mv64x60_wdt_handler_disable();

clear_bit(MV64x60_WDOG_FLAG_OPENED, &wdt_flags);

Expand Down

0 comments on commit 659412f

Please sign in to comment.