]> git.karo-electronics.de Git - karo-tx-linux.git/commit
watchdog: Use "request_muxed_region" in it87 watchdog drivers
authorNat Gurumoorthy <natg@google.com>
Mon, 9 May 2011 18:45:07 +0000 (11:45 -0700)
committerWim Van Sebroeck <wim@iguana.be>
Fri, 1 Jul 2011 08:05:13 +0000 (08:05 +0000)
commitcf15ee095223cda851e36e81fae1a806ba6bb13e
treee2decfeca51012bf8000643f1ddc9f8aa6ac1796
parentdaf54f1f363a61c618662ef66d4bf09d2b090941
watchdog: Use "request_muxed_region" in it87 watchdog drivers

Changes the it87 watchdog drivers to use "request_muxed_region".
Serialize access to the hardware by using "request_muxed_region" macro defined
by Alan Cox. Call to this macro will hold off the requestor if the resource is
currently busy.

The use of the above macro makes it possible to get rid of
spinlocks in it8712f_wdt.c and it87_wdt.c watchdog drivers.
This also greatly simplifies the implementation of it87_wdt.c driver.

 "superio_enter" will return an error if call to "request_muxed_region" fails.
Rest of the code change is to ripple an error return from superio_enter to
the top level.

Signed-off-by: Nat Gurumoorthy <natg@google.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/it8712f_wdt.c
drivers/watchdog/it87_wdt.c