Make all it87 drivers SMP safe.
PATCH 2/3 Make all it87 drivers SMP safe.
02 - Adds changes to watchdog drivers to use the new lock.
Signed-off-by Nat Gurumoorthy <[email protected]>
---
drivers/watchdog/it8712f_wdt.c +5 -5
@@ -32,6 +32,7 @@#include <linux/spinlock.h> #include <linux/uaccess.h> #include <linux/io.h> +#include <linux/it87_lock.h> #define NAME "it8712f_wdt"
@@ -51,7 +52,6 @@ MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");static unsigned long wdt_open;static unsigned expect_close; -static spinlock_t io_lock;static unsigned char revision;/* Dog Food address - We use the game port address */
@@ -122,8 +122,9 @@ static inline void superio_select(int ldn) }static inline void superio_enter (void ) +__acquires(&it87_io_lock) { -spin_lock (&io_lock); +spin_lock (&it87_io_lock);outb (0x87 ,REG );outb (0x01 ,REG );outb (0x55 ,REG );
@@ -131,10 +132,11 @@ static inline void superio_enter(void) }static inline void superio_exit (void ) +__releases(&it87_io_lock) {outb (0x02 ,REG );outb (0x02 ,VAL ); -spin_unlock (&io_lock); +spin_unlock (&it87_io_lock); }static inline void it8712f_wdt_ping (void )
@@ -382,8 +384,6 @@ static int __init it8712f_wdt_init(void) {int err =0 ; -spin_lock_init (&io_lock); -if (it8712f_wdt_find (&address))return -ENODEV ;
drivers/watchdog/it87_wdt.c +7 -35
208 lines not on this page · raw message
Signature · 4 lines
_______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors