summaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2007-01-07 21:57:03 +0100
committerWim Van Sebroeck <wim@iguana.be>2007-01-07 21:57:03 +0100
commit045798b56f59d02beef84d5aa7137786c50912c2 (patch)
tree2f8d96ad0870a5d8f2b54028e2eb686b60d5e8d7 /drivers/char/watchdog
parent39e3a0556a1e2d33f9491d43bae9fdaa09b0308a (diff)
downloadblackbird-op-linux-045798b56f59d02beef84d5aa7137786c50912c2.tar.gz
blackbird-op-linux-045798b56f59d02beef84d5aa7137786c50912c2.zip
[WATCHDOG] pcwd_pci.c - spinlock fixes
the keepalive and get_temperature functions should use spinlocks also. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r--drivers/char/watchdog/pcwd_pci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/watchdog/pcwd_pci.c b/drivers/char/watchdog/pcwd_pci.c
index 059ac9f12de7..95ddcd8c1db2 100644
--- a/drivers/char/watchdog/pcwd_pci.c
+++ b/drivers/char/watchdog/pcwd_pci.c
@@ -298,7 +298,9 @@ static int pcipcwd_stop(void)
static int pcipcwd_keepalive(void)
{
/* Re-trigger watchdog by writing to port 0 */
+ spin_lock(&pcipcwd_private.io_lock);
outb_p(0x42, pcipcwd_private.io_addr); /* send out any data */
+ spin_unlock(&pcipcwd_private.io_lock);
if (debug >= DEBUG)
printk(KERN_DEBUG PFX "Watchdog keepalive signal send\n");
@@ -385,7 +387,9 @@ static int pcipcwd_get_temperature(int *temperature)
if (!pcipcwd_private.supports_temp)
return -ENODEV;
+ spin_lock(&pcipcwd_private.io_lock);
*temperature = inb_p(pcipcwd_private.io_addr);
+ spin_unlock(&pcipcwd_private.io_lock);
/*
* Convert celsius to fahrenheit, since this was
@@ -814,6 +818,8 @@ static int __init pcipcwd_init_module(void)
static void __exit pcipcwd_cleanup_module(void)
{
pci_unregister_driver(&pcipcwd_driver);
+
+ printk(KERN_INFO PFX "Watchdog Module Unloaded.\n");
}
module_init(pcipcwd_init_module);
OpenPOWER on IntegriCloud