Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Oliver Schuster and committed by
Linus Torvalds
0e45adb8 d5f1a21c

+2 -12
+2 -12
drivers/watchdog/it8712f_wdt.c
··· 111 111 return val; 112 112 } 113 113 114 - static void 115 - superio_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 - 123 114 static inline void 124 115 superio_select(int ldn) 125 116 { ··· 161 170 superio_outb(config, WDT_CONFIG); 162 171 163 172 if (revision >= 0x08) 164 - superio_outw(units, WDT_TIMEOUT); 165 - else 166 - superio_outb(units, WDT_TIMEOUT); 173 + superio_outb(units >> 8, WDT_TIMEOUT + 1); 174 + superio_outb(units, WDT_TIMEOUT); 167 175 } 168 176 169 177 static int