Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-wat…
Browse files Browse the repository at this point in the history
…chdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] w83627hf_wdt.c: add support for the W83627EHF support
  [WATCHDOG] SA1100 watchdog maximum timeout
  [WATCHDOG] w83697ug, fix lock imbalance
  [WATCHDOG] drivers/watchdog/bcm47xx_wdt.c: Remove unnecessary semicolons
  • Loading branch information
Linus Torvalds committed Jul 10, 2009
2 parents 016d356 + cf1eaab commit b690a37
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/watchdog/bcm47xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static long bcm47xx_wdt_ioctl(struct file *file,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
int new_value, retval = -EINVAL;;
int new_value, retval = -EINVAL;

switch (cmd) {
case WDIOC_GETSUPPORT:
Expand Down
5 changes: 3 additions & 2 deletions drivers/watchdog/sa1100_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

static unsigned long oscr_freq;
static unsigned long sa1100wdt_users;
static int pre_margin;
static unsigned int pre_margin;
static int boot_status;

/*
Expand Down Expand Up @@ -84,6 +84,7 @@ static const struct watchdog_info ident = {
.options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT
| WDIOF_KEEPALIVEPING,
.identity = "SA1100/PXA255 Watchdog",
.firmware_version = 1,
};

static long sa1100dog_ioctl(struct file *file, unsigned int cmd,
Expand Down Expand Up @@ -118,7 +119,7 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd,
if (ret)
break;

if (time <= 0 || time > 255) {
if (time <= 0 || (oscr_freq * (long long)time >= 0xffffffff)) {
ret = -EINVAL;
break;
}
Expand Down
5 changes: 5 additions & 0 deletions drivers/watchdog/w83627hf_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ static void w83627hf_select_wd_register(void)
c = ((inb_p(WDT_EFDR) & 0xf7) | 0x04); /* select WDT0 */
outb_p(0x2b, WDT_EFER);
outb_p(c, WDT_EFDR); /* set GPIO3 to WDT0 */
} else if (c == 0x88) { /* W83627EHF */
outb_p(0x2d, WDT_EFER); /* select GPIO5 */
c = inb_p(WDT_EFDR) & ~0x01; /* PIN77 -> WDT0# */
outb_p(0x2d, WDT_EFER);
outb_p(c, WDT_EFDR); /* set GPIO5 to WDT0 */
}

outb_p(0x07, WDT_EFER); /* point to logical device number reg */
Expand Down
4 changes: 3 additions & 1 deletion drivers/watchdog/w83697ug_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ static void wdt_ctrl(int timeout)
{
spin_lock(&io_lock);

if (w83697ug_select_wd_register() < 0)
if (w83697ug_select_wd_register() < 0) {
spin_unlock(&io_lock);
return;
}

outb_p(0xF4, WDT_EFER); /* Select CRF4 */
outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */
Expand Down

0 comments on commit b690a37

Please sign in to comment.