aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorOliver Schuster <oliver.s@inbox.com>2008-04-01 11:06:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-01 14:31:05 -0400
commit0e45adb8f5371f3d20a6df21cd13ce32fbe9bf15 (patch)
tree15a603c06c3cf93aac29db83c3458f4f73dbda4b /drivers/watchdog
parentd5f1a21ca05cad212829460ee7900915128e3401 (diff)
[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: Oliver Schuster <olivers137@aol.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/it8712f_wdt.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c
index 1efcad3b6fca..ca90c5192596 100644
--- a/drivers/watchdog/it8712f_wdt.c
+++ b/drivers/watchdog/it8712f_wdt.c
@@ -111,15 +111,6 @@ superio_inw(int reg)
111 return val; 111 return val;
112} 112}
113 113
114static void
115superio_outw(int val, int reg)
116{
117 outb(reg++, REG);
118 outb((val >> 8) & 0xff, VAL);
119 outb(reg, REG);
120 outb(val & 0xff, VAL);
121}
122
123static inline void 114static inline void
124superio_select(int ldn) 115superio_select(int ldn)
125{ 116{
@@ -170,9 +161,8 @@ it8712f_wdt_update_margin(void)
170 superio_outb(config, WDT_CONFIG); 161 superio_outb(config, WDT_CONFIG);
171 162
172 if (revision >= 0x08) 163 if (revision >= 0x08)
173 superio_outw(units, WDT_TIMEOUT); 164 superio_outb(units >> 8, WDT_TIMEOUT + 1);
174 else 165 superio_outb(units, WDT_TIMEOUT);
175 superio_outb(units, WDT_TIMEOUT);
176} 166}
177 167
178static int 168static int