Commit 0e45adb8 authored by Oliver Schuster's avatar Oliver Schuster Committed by Linus Torvalds

[WATCHDOG] Fix it8712f_wdt.c wrong byte order accessing WDT_TIMEOUT

This patch corrects an error in the driver it8712f_wdt.  You cannot set
the 16-bit WDT_TIMEOUT access as a 16-bit outw, because the byte
ordering will be wrong.  So just do the high 8 bits as a separate
access.
Signed-off-by: default avatarOliver Schuster <olivers137@aol.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d5f1a21c
...@@ -111,15 +111,6 @@ superio_inw(int reg) ...@@ -111,15 +111,6 @@ superio_inw(int reg)
return val; return val;
} }
static void
superio_outw(int val, int reg)
{
outb(reg++, REG);
outb((val >> 8) & 0xff, VAL);
outb(reg, REG);
outb(val & 0xff, VAL);
}
static inline void static inline void
superio_select(int ldn) superio_select(int ldn)
{ {
...@@ -170,9 +161,8 @@ it8712f_wdt_update_margin(void) ...@@ -170,9 +161,8 @@ it8712f_wdt_update_margin(void)
superio_outb(config, WDT_CONFIG); superio_outb(config, WDT_CONFIG);
if (revision >= 0x08) if (revision >= 0x08)
superio_outw(units, WDT_TIMEOUT); superio_outb(units >> 8, WDT_TIMEOUT + 1);
else superio_outb(units, WDT_TIMEOUT);
superio_outb(units, WDT_TIMEOUT);
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment