Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190325
b: refs/heads/master
c: 322af98
h: refs/heads/master
i:
  190323: 9eddd5f
v: v3
  • Loading branch information
Denis Turischev authored and Wim Van Sebroeck committed Apr 26, 2010
1 parent c93102d commit 7b9cfef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: fcf1dd7e68ceb6420478c8d89d35b4745d0b2f42
refs/heads/master: 322af98c56c70b3ec6f637fb07d41a9591a6ff9a
10 changes: 5 additions & 5 deletions trunk/drivers/watchdog/sbc_fitpc2_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
static int nowayout = WATCHDOG_NOWAYOUT;
static unsigned int margin = 60; /* (secs) Default is 1 minute */
static unsigned long wdt_status;
static DEFINE_SPINLOCK(wdt_lock);
static DEFINE_MUTEX(wdt_lock);

#define WDT_IN_USE 0
#define WDT_OK_TO_CLOSE 1
Expand All @@ -53,18 +53,18 @@ static void wdt_send_data(unsigned char command, unsigned char data)

static void wdt_enable(void)
{
spin_lock(&wdt_lock);
mutex_lock(&wdt_lock);
wdt_send_data(IFACE_ON_COMMAND, 1);
wdt_send_data(REBOOT_COMMAND, margin);
spin_unlock(&wdt_lock);
mutex_unlock(&wdt_lock);
}

static void wdt_disable(void)
{
spin_lock(&wdt_lock);
mutex_lock(&wdt_lock);
wdt_send_data(IFACE_ON_COMMAND, 0);
wdt_send_data(REBOOT_COMMAND, 0);
spin_unlock(&wdt_lock);
mutex_unlock(&wdt_lock);
}

static int fitpc2_wdt_open(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 7b9cfef

Please sign in to comment.