aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/watchdog/alim1535_wdt.c4
-rw-r--r--drivers/watchdog/davinci_wdt.c6
-rw-r--r--drivers/watchdog/i6300esb.c4
-rw-r--r--drivers/watchdog/iTCO_wdt.c114
-rw-r--r--drivers/watchdog/ib700wdt.c4
-rw-r--r--drivers/watchdog/machzwd.c7
-rw-r--r--drivers/watchdog/mpc83xx_wdt.c5
-rw-r--r--drivers/watchdog/pc87413_wdt.c4
-rw-r--r--drivers/watchdog/pnx4008_wdt.c6
-rw-r--r--drivers/watchdog/sbc8360.c3
-rw-r--r--drivers/watchdog/sc1200wdt.c3
-rw-r--r--drivers/watchdog/sc520_wdt.c4
-rw-r--r--drivers/watchdog/smsc37b787_wdt.c4
-rw-r--r--drivers/watchdog/w83627hf_wdt.c4
-rw-r--r--drivers/watchdog/w83697hf_wdt.c4
-rw-r--r--drivers/watchdog/w83877f_wdt.c4
-rw-r--r--drivers/watchdog/w83977f_wdt.c4
-rw-r--r--drivers/watchdog/wafer5823wdt.c4
-rw-r--r--drivers/watchdog/wdt.c3
-rw-r--r--drivers/watchdog/wdt977.c4
-rw-r--r--drivers/watchdog/wdt_pci.c6
21 files changed, 92 insertions, 109 deletions
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index c404fc69e7e6..b481cc0e32e4 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -31,7 +31,7 @@ static unsigned long ali_is_open;
31static char ali_expect_release; 31static char ali_expect_release;
32static struct pci_dev *ali_pci; 32static struct pci_dev *ali_pci;
33static u32 ali_timeout_bits; /* stores the computed timeout */ 33static u32 ali_timeout_bits; /* stores the computed timeout */
34static spinlock_t ali_lock; /* Guards the hardware */ 34static DEFINE_SPINLOCK(ali_lock); /* Guards the hardware */
35 35
36/* module parameters */ 36/* module parameters */
37static int timeout = WATCHDOG_TIMEOUT; 37static int timeout = WATCHDOG_TIMEOUT;
@@ -398,8 +398,6 @@ static int __init watchdog_init(void)
398{ 398{
399 int ret; 399 int ret;
400 400
401 spin_lock_init(&ali_lock);
402
403 /* Check whether or not the hardware watchdog is there */ 401 /* Check whether or not the hardware watchdog is there */
404 if (ali_find_watchdog() != 0) { 402 if (ali_find_watchdog() != 0) {
405 return -ENODEV; 403 return -ENODEV;
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 19db5302ba6e..a61cbd48dc07 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -61,7 +61,7 @@
61 61
62static int heartbeat = DEFAULT_HEARTBEAT; 62static int heartbeat = DEFAULT_HEARTBEAT;
63 63
64static spinlock_t io_lock; 64static DEFINE_SPINLOCK(io_lock);
65static unsigned long wdt_status; 65static unsigned long wdt_status;
66#define WDT_IN_USE 0 66#define WDT_IN_USE 0
67#define WDT_OK_TO_CLOSE 1 67#define WDT_OK_TO_CLOSE 1
@@ -200,8 +200,6 @@ static int davinci_wdt_probe(struct platform_device *pdev)
200 int ret = 0, size; 200 int ret = 0, size;
201 struct resource *res; 201 struct resource *res;
202 202
203 spin_lock_init(&io_lock);
204
205 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) 203 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
206 heartbeat = DEFAULT_HEARTBEAT; 204 heartbeat = DEFAULT_HEARTBEAT;
207 205
@@ -262,7 +260,7 @@ static int __init davinci_wdt_init(void)
262 260
263static void __exit davinci_wdt_exit(void) 261static void __exit davinci_wdt_exit(void)
264{ 262{
265 return platform_driver_unregister(&platform_wdt_driver); 263 platform_driver_unregister(&platform_wdt_driver);
266} 264}
267 265
268module_init(davinci_wdt_init); 266module_init(davinci_wdt_init);
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
index f236954d2536..ca44fd9b19bb 100644
--- a/drivers/watchdog/i6300esb.c
+++ b/drivers/watchdog/i6300esb.c
@@ -77,7 +77,7 @@
77 77
78/* internal variables */ 78/* internal variables */
79static void __iomem *BASEADDR; 79static void __iomem *BASEADDR;
80static spinlock_t esb_lock; /* Guards the hardware */ 80static DEFINE_SPINLOCK(esb_lock); /* Guards the hardware */
81static unsigned long timer_alive; 81static unsigned long timer_alive;
82static struct pci_dev *esb_pci; 82static struct pci_dev *esb_pci;
83static unsigned short triggered; /* The status of the watchdog upon boot */ 83static unsigned short triggered; /* The status of the watchdog upon boot */
@@ -456,8 +456,6 @@ static int __init watchdog_init (void)
456{ 456{
457 int ret; 457 int ret;
458 458
459 spin_lock_init(&esb_lock);
460
461 /* Check whether or not the hardware watchdog is there */ 459 /* Check whether or not the hardware watchdog is there */
462 if (!esb_getdevice () || esb_pci == NULL) 460 if (!esb_getdevice () || esb_pci == NULL)
463 return -ENODEV; 461 return -ENODEV;
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index cd5a565bc3a0..a0e6809e369f 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -35,10 +35,12 @@
35 * 82801GDH (ICH7DH) : document number 307013-002, 307014-009, 35 * 82801GDH (ICH7DH) : document number 307013-002, 307014-009,
36 * 82801GBM (ICH7-M) : document number 307013-002, 307014-009, 36 * 82801GBM (ICH7-M) : document number 307013-002, 307014-009,
37 * 82801GHM (ICH7-M DH) : document number 307013-002, 307014-009, 37 * 82801GHM (ICH7-M DH) : document number 307013-002, 307014-009,
38 * 82801HB (ICH8) : document number 313056-002, 313057-004, 38 * 82801HB (ICH8) : document number 313056-003, 313057-009,
39 * 82801HR (ICH8R) : document number 313056-002, 313057-004, 39 * 82801HR (ICH8R) : document number 313056-003, 313057-009,
40 * 82801HH (ICH8DH) : document number 313056-002, 313057-004, 40 * 82801HBM (ICH8M) : document number 313056-003, 313057-009,
41 * 82801HO (ICH8DO) : document number 313056-002, 313057-004, 41 * 82801HH (ICH8DH) : document number 313056-003, 313057-009,
42 * 82801HO (ICH8DO) : document number 313056-003, 313057-009,
43 * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009,
42 * 82801IB (ICH9) : document number 316972-001, 316973-001, 44 * 82801IB (ICH9) : document number 316972-001, 316973-001,
43 * 82801IR (ICH9R) : document number 316972-001, 316973-001, 45 * 82801IR (ICH9R) : document number 316972-001, 316973-001,
44 * 82801IH (ICH9DH) : document number 316972-001, 316973-001, 46 * 82801IH (ICH9DH) : document number 316972-001, 316973-001,
@@ -95,8 +97,10 @@ enum iTCO_chipsets {
95 TCO_ICH7M, /* ICH7-M */ 97 TCO_ICH7M, /* ICH7-M */
96 TCO_ICH7MDH, /* ICH7-M DH */ 98 TCO_ICH7MDH, /* ICH7-M DH */
97 TCO_ICH8, /* ICH8 & ICH8R */ 99 TCO_ICH8, /* ICH8 & ICH8R */
100 TCO_ICH8ME, /* ICH8M-E */
98 TCO_ICH8DH, /* ICH8DH */ 101 TCO_ICH8DH, /* ICH8DH */
99 TCO_ICH8DO, /* ICH8DO */ 102 TCO_ICH8DO, /* ICH8DO */
103 TCO_ICH8M, /* ICH8M */
100 TCO_ICH9, /* ICH9 */ 104 TCO_ICH9, /* ICH9 */
101 TCO_ICH9R, /* ICH9R */ 105 TCO_ICH9R, /* ICH9R */
102 TCO_ICH9DH, /* ICH9DH */ 106 TCO_ICH9DH, /* ICH9DH */
@@ -125,8 +129,10 @@ static struct {
125 {"ICH7-M", 2}, 129 {"ICH7-M", 2},
126 {"ICH7-M DH", 2}, 130 {"ICH7-M DH", 2},
127 {"ICH8 or ICH8R", 2}, 131 {"ICH8 or ICH8R", 2},
132 {"ICH8M-E", 2},
128 {"ICH8DH", 2}, 133 {"ICH8DH", 2},
129 {"ICH8DO", 2}, 134 {"ICH8DO", 2},
135 {"ICH8M", 2},
130 {"ICH9", 2}, 136 {"ICH9", 2},
131 {"ICH9R", 2}, 137 {"ICH9R", 2},
132 {"ICH9DH", 2}, 138 {"ICH9DH", 2},
@@ -134,6 +140,15 @@ static struct {
134 {NULL,0} 140 {NULL,0}
135}; 141};
136 142
143#define ITCO_PCI_DEVICE(dev, data) \
144 .vendor = PCI_VENDOR_ID_INTEL, \
145 .device = dev, \
146 .subvendor = PCI_ANY_ID, \
147 .subdevice = PCI_ANY_ID, \
148 .class = 0, \
149 .class_mask = 0, \
150 .driver_data = data
151
137/* 152/*
138 * This data only exists for exporting the supported PCI ids 153 * This data only exists for exporting the supported PCI ids
139 * via MODULE_DEVICE_TABLE. We do not actually register a 154 * via MODULE_DEVICE_TABLE. We do not actually register a
@@ -141,45 +156,47 @@ static struct {
141 * functions that probably will be registered by other drivers. 156 * functions that probably will be registered by other drivers.
142 */ 157 */
143static struct pci_device_id iTCO_wdt_pci_tbl[] = { 158static struct pci_device_id iTCO_wdt_pci_tbl[] = {
144 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH }, 159 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AA_0, TCO_ICH )},
145 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH0 }, 160 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AB_0, TCO_ICH0 )},
146 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2 }, 161 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_0, TCO_ICH2 )},
147 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2M }, 162 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_10, TCO_ICH2M )},
148 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3 }, 163 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_0, TCO_ICH3 )},
149 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3M }, 164 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_12, TCO_ICH3M )},
150 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4 }, 165 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_0, TCO_ICH4 )},
151 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4M }, 166 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_12, TCO_ICH4M )},
152 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_CICH }, 167 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801E_0, TCO_CICH )},
153 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH5 }, 168 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801EB_0, TCO_ICH5 )},
154 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_6300ESB }, 169 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB_1, TCO_6300ESB)},
155 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6 }, 170 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_0, TCO_ICH6 )},
156 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6M }, 171 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_1, TCO_ICH6M )},
157 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6W }, 172 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_2, TCO_ICH6W )},
158 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7 }, 173 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_0, TCO_ICH7 )},
159 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7M }, 174 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_1, TCO_ICH7M )},
160 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7MDH }, 175 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_31, TCO_ICH7MDH)},
161 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8 }, 176 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_0, TCO_ICH8 )},
162 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DH }, 177 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_1, TCO_ICH8ME )},
163 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DO }, 178 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_2, TCO_ICH8DH )},
164 { PCI_VENDOR_ID_INTEL, 0x2918, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9 }, 179 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_3, TCO_ICH8DO )},
165 { PCI_VENDOR_ID_INTEL, 0x2916, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9R }, 180 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_4, TCO_ICH8M )},
166 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9DH }, 181 { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )},
167 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 182 { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )},
168 { PCI_VENDOR_ID_INTEL, 0x2671, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 183 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )},
169 { PCI_VENDOR_ID_INTEL, 0x2672, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 184 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)},
170 { PCI_VENDOR_ID_INTEL, 0x2673, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 185 { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)},
171 { PCI_VENDOR_ID_INTEL, 0x2674, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 186 { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)},
172 { PCI_VENDOR_ID_INTEL, 0x2675, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 187 { ITCO_PCI_DEVICE(0x2673, TCO_631XESB)},
173 { PCI_VENDOR_ID_INTEL, 0x2676, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 188 { ITCO_PCI_DEVICE(0x2674, TCO_631XESB)},
174 { PCI_VENDOR_ID_INTEL, 0x2677, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 189 { ITCO_PCI_DEVICE(0x2675, TCO_631XESB)},
175 { PCI_VENDOR_ID_INTEL, 0x2678, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 190 { ITCO_PCI_DEVICE(0x2676, TCO_631XESB)},
176 { PCI_VENDOR_ID_INTEL, 0x2679, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 191 { ITCO_PCI_DEVICE(0x2677, TCO_631XESB)},
177 { PCI_VENDOR_ID_INTEL, 0x267a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 192 { ITCO_PCI_DEVICE(0x2678, TCO_631XESB)},
178 { PCI_VENDOR_ID_INTEL, 0x267b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 193 { ITCO_PCI_DEVICE(0x2679, TCO_631XESB)},
179 { PCI_VENDOR_ID_INTEL, 0x267c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 194 { ITCO_PCI_DEVICE(0x267a, TCO_631XESB)},
180 { PCI_VENDOR_ID_INTEL, 0x267d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 195 { ITCO_PCI_DEVICE(0x267b, TCO_631XESB)},
181 { PCI_VENDOR_ID_INTEL, 0x267e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 196 { ITCO_PCI_DEVICE(0x267c, TCO_631XESB)},
182 { PCI_VENDOR_ID_INTEL, 0x267f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 197 { ITCO_PCI_DEVICE(0x267d, TCO_631XESB)},
198 { ITCO_PCI_DEVICE(0x267e, TCO_631XESB)},
199 { ITCO_PCI_DEVICE(0x267f, TCO_631XESB)},
183 { 0, }, /* End of list */ 200 { 0, }, /* End of list */
184}; 201};
185MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl); 202MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl);
@@ -300,6 +317,7 @@ static int iTCO_wdt_start(void)
300 317
301 /* disable chipset's NO_REBOOT bit */ 318 /* disable chipset's NO_REBOOT bit */
302 if (iTCO_wdt_unset_NO_REBOOT_bit()) { 319 if (iTCO_wdt_unset_NO_REBOOT_bit()) {
320 spin_unlock(&iTCO_wdt_private.io_lock);
303 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n"); 321 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n");
304 return -EIO; 322 return -EIO;
305 } 323 }
@@ -590,7 +608,7 @@ static struct miscdevice iTCO_wdt_miscdev = {
590 * Init & exit routines 608 * Init & exit routines
591 */ 609 */
592 610
593static int iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev) 611static int __devinit iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev)
594{ 612{
595 int ret; 613 int ret;
596 u32 base_address; 614 u32 base_address;
@@ -694,7 +712,7 @@ out:
694 return ret; 712 return ret;
695} 713}
696 714
697static void iTCO_wdt_cleanup(void) 715static void __devexit iTCO_wdt_cleanup(void)
698{ 716{
699 /* Stop the timer before we leave */ 717 /* Stop the timer before we leave */
700 if (!nowayout) 718 if (!nowayout)
@@ -709,7 +727,7 @@ static void iTCO_wdt_cleanup(void)
709 iTCO_wdt_private.ACPIBASE = 0; 727 iTCO_wdt_private.ACPIBASE = 0;
710} 728}
711 729
712static int iTCO_wdt_probe(struct platform_device *dev) 730static int __devinit iTCO_wdt_probe(struct platform_device *dev)
713{ 731{
714 int found = 0; 732 int found = 0;
715 struct pci_dev *pdev = NULL; 733 struct pci_dev *pdev = NULL;
@@ -735,7 +753,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
735 return 0; 753 return 0;
736} 754}
737 755
738static int iTCO_wdt_remove(struct platform_device *dev) 756static int __devexit iTCO_wdt_remove(struct platform_device *dev)
739{ 757{
740 if (iTCO_wdt_private.ACPIBASE) 758 if (iTCO_wdt_private.ACPIBASE)
741 iTCO_wdt_cleanup(); 759 iTCO_wdt_cleanup();
@@ -753,7 +771,7 @@ static void iTCO_wdt_shutdown(struct platform_device *dev)
753 771
754static struct platform_driver iTCO_wdt_driver = { 772static struct platform_driver iTCO_wdt_driver = {
755 .probe = iTCO_wdt_probe, 773 .probe = iTCO_wdt_probe,
756 .remove = iTCO_wdt_remove, 774 .remove = __devexit_p(iTCO_wdt_remove),
757 .shutdown = iTCO_wdt_shutdown, 775 .shutdown = iTCO_wdt_shutdown,
758 .suspend = iTCO_wdt_suspend, 776 .suspend = iTCO_wdt_suspend,
759 .resume = iTCO_wdt_resume, 777 .resume = iTCO_wdt_resume,
diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c
index c3a60f52ccb9..4b89f401691a 100644
--- a/drivers/watchdog/ib700wdt.c
+++ b/drivers/watchdog/ib700wdt.c
@@ -48,7 +48,7 @@
48 48
49static struct platform_device *ibwdt_platform_device; 49static struct platform_device *ibwdt_platform_device;
50static unsigned long ibwdt_is_open; 50static unsigned long ibwdt_is_open;
51static spinlock_t ibwdt_lock; 51static DEFINE_SPINLOCK(ibwdt_lock);
52static char expect_close; 52static char expect_close;
53 53
54/* Module information */ 54/* Module information */
@@ -308,8 +308,6 @@ static int __devinit ibwdt_probe(struct platform_device *dev)
308{ 308{
309 int res; 309 int res;
310 310
311 spin_lock_init(&ibwdt_lock);
312
313#if WDT_START != WDT_STOP 311#if WDT_START != WDT_STOP
314 if (!request_region(WDT_STOP, 1, "IB700 WDT")) { 312 if (!request_region(WDT_STOP, 1, "IB700 WDT")) {
315 printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP); 313 printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP);
diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
index 6d35bb112a5f..e6e07b4575eb 100644
--- a/drivers/watchdog/machzwd.c
+++ b/drivers/watchdog/machzwd.c
@@ -123,8 +123,8 @@ static void zf_ping(unsigned long data);
123static int zf_action = GEN_RESET; 123static int zf_action = GEN_RESET;
124static unsigned long zf_is_open; 124static unsigned long zf_is_open;
125static char zf_expect_close; 125static char zf_expect_close;
126static spinlock_t zf_lock; 126static DEFINE_SPINLOCK(zf_lock);
127static spinlock_t zf_port_lock; 127static DEFINE_SPINLOCK(zf_port_lock);
128static DEFINE_TIMER(zf_timer, zf_ping, 0, 0); 128static DEFINE_TIMER(zf_timer, zf_ping, 0, 0);
129static unsigned long next_heartbeat = 0; 129static unsigned long next_heartbeat = 0;
130 130
@@ -438,9 +438,6 @@ static int __init zf_init(void)
438 438
439 zf_show_action(action); 439 zf_show_action(action);
440 440
441 spin_lock_init(&zf_lock);
442 spin_lock_init(&zf_port_lock);
443
444 if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){ 441 if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){
445 printk(KERN_ERR "cannot reserve I/O ports at %d\n", 442 printk(KERN_ERR "cannot reserve I/O ports at %d\n",
446 ZF_IOBASE); 443 ZF_IOBASE);
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
index a0bf95fb9763..6369f569517f 100644
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ b/drivers/watchdog/mpc83xx_wdt.c
@@ -56,7 +56,7 @@ static int prescale = 1;
56static unsigned int timeout_sec; 56static unsigned int timeout_sec;
57 57
58static unsigned long wdt_is_open; 58static unsigned long wdt_is_open;
59static spinlock_t wdt_spinlock; 59static DEFINE_SPINLOCK(wdt_spinlock);
60 60
61static void mpc83xx_wdt_keepalive(void) 61static void mpc83xx_wdt_keepalive(void)
62{ 62{
@@ -185,9 +185,6 @@ static int __devinit mpc83xx_wdt_probe(struct platform_device *dev)
185 printk(KERN_INFO "WDT driver for MPC83xx initialized. " 185 printk(KERN_INFO "WDT driver for MPC83xx initialized. "
186 "mode:%s timeout=%d (%d seconds)\n", 186 "mode:%s timeout=%d (%d seconds)\n",
187 reset ? "reset":"interrupt", timeout, timeout_sec); 187 reset ? "reset":"interrupt", timeout, timeout_sec);
188
189 spin_lock_init(&wdt_spinlock);
190
191 return 0; 188 return 0;
192 189
193err_unmap: 190err_unmap:
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c
index 3d3deae0d64b..15e4f8887a9e 100644
--- a/drivers/watchdog/pc87413_wdt.c
+++ b/drivers/watchdog/pc87413_wdt.c
@@ -61,7 +61,7 @@ static unsigned long timer_enabled = 0; /* is the timer enabled? */
61 61
62static char expect_close; /* is the close expected? */ 62static char expect_close; /* is the close expected? */
63 63
64static spinlock_t io_lock; /* to guard the watchdog from io races */ 64static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */
65 65
66static int nowayout = WATCHDOG_NOWAYOUT; 66static int nowayout = WATCHDOG_NOWAYOUT;
67 67
@@ -561,8 +561,6 @@ static int __init pc87413_init(void)
561{ 561{
562 int ret; 562 int ret;
563 563
564 spin_lock_init(&io_lock);
565
566 printk(KERN_INFO PFX "Version " VERSION " at io 0x%X\n", WDT_INDEX_IO_PORT); 564 printk(KERN_INFO PFX "Version " VERSION " at io 0x%X\n", WDT_INDEX_IO_PORT);
567 565
568 /* request_region(io, 2, "pc87413"); */ 566 /* request_region(io, 2, "pc87413"); */
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 22f8873dd092..b04aa096a10a 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -80,7 +80,7 @@
80static int nowayout = WATCHDOG_NOWAYOUT; 80static int nowayout = WATCHDOG_NOWAYOUT;
81static int heartbeat = DEFAULT_HEARTBEAT; 81static int heartbeat = DEFAULT_HEARTBEAT;
82 82
83static spinlock_t io_lock; 83static DEFINE_SPINLOCK(io_lock);
84static unsigned long wdt_status; 84static unsigned long wdt_status;
85#define WDT_IN_USE 0 85#define WDT_IN_USE 0
86#define WDT_OK_TO_CLOSE 1 86#define WDT_OK_TO_CLOSE 1
@@ -254,8 +254,6 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
254 int ret = 0, size; 254 int ret = 0, size;
255 struct resource *res; 255 struct resource *res;
256 256
257 spin_lock_init(&io_lock);
258
259 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) 257 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
260 heartbeat = DEFAULT_HEARTBEAT; 258 heartbeat = DEFAULT_HEARTBEAT;
261 259
@@ -335,7 +333,7 @@ static int __init pnx4008_wdt_init(void)
335 333
336static void __exit pnx4008_wdt_exit(void) 334static void __exit pnx4008_wdt_exit(void)
337{ 335{
338 return platform_driver_unregister(&platform_wdt_driver); 336 platform_driver_unregister(&platform_wdt_driver);
339} 337}
340 338
341module_init(pnx4008_wdt_init); 339module_init(pnx4008_wdt_init);
diff --git a/drivers/watchdog/sbc8360.c b/drivers/watchdog/sbc8360.c
index 285d85289532..2ee2677f3648 100644
--- a/drivers/watchdog/sbc8360.c
+++ b/drivers/watchdog/sbc8360.c
@@ -54,7 +54,7 @@
54#include <asm/system.h> 54#include <asm/system.h>
55 55
56static unsigned long sbc8360_is_open; 56static unsigned long sbc8360_is_open;
57static spinlock_t sbc8360_lock; 57static DEFINE_SPINLOCK(sbc8360_lock);
58static char expect_close; 58static char expect_close;
59 59
60#define PFX "sbc8360: " 60#define PFX "sbc8360: "
@@ -359,7 +359,6 @@ static int __init sbc8360_init(void)
359 goto out_noreboot; 359 goto out_noreboot;
360 } 360 }
361 361
362 spin_lock_init(&sbc8360_lock);
363 res = misc_register(&sbc8360_miscdev); 362 res = misc_register(&sbc8360_miscdev);
364 if (res) { 363 if (res) {
365 printk(KERN_ERR PFX "failed to register misc device\n"); 364 printk(KERN_ERR PFX "failed to register misc device\n");
diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c
index 9670d47190d0..32ccd7c89c7d 100644
--- a/drivers/watchdog/sc1200wdt.c
+++ b/drivers/watchdog/sc1200wdt.c
@@ -74,7 +74,7 @@ static int io = -1;
74static int io_len = 2; /* for non plug and play */ 74static int io_len = 2; /* for non plug and play */
75static struct semaphore open_sem; 75static struct semaphore open_sem;
76static char expect_close; 76static char expect_close;
77static spinlock_t sc1200wdt_lock; /* io port access serialisation */ 77static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */
78 78
79#if defined CONFIG_PNP 79#if defined CONFIG_PNP
80static int isapnp = 1; 80static int isapnp = 1;
@@ -375,7 +375,6 @@ static int __init sc1200wdt_init(void)
375 375
376 printk("%s\n", banner); 376 printk("%s\n", banner);
377 377
378 spin_lock_init(&sc1200wdt_lock);
379 sema_init(&open_sem, 1); 378 sema_init(&open_sem, 1);
380 379
381#if defined CONFIG_PNP 380#if defined CONFIG_PNP
diff --git a/drivers/watchdog/sc520_wdt.c b/drivers/watchdog/sc520_wdt.c
index e8594c64d1e6..2847324a2be2 100644
--- a/drivers/watchdog/sc520_wdt.c
+++ b/drivers/watchdog/sc520_wdt.c
@@ -125,7 +125,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
125static unsigned long next_heartbeat; 125static unsigned long next_heartbeat;
126static unsigned long wdt_is_open; 126static unsigned long wdt_is_open;
127static char wdt_expect_close; 127static char wdt_expect_close;
128static spinlock_t wdt_spinlock; 128static DEFINE_SPINLOCK(wdt_spinlock);
129 129
130/* 130/*
131 * Whack the dog 131 * Whack the dog
@@ -383,8 +383,6 @@ static int __init sc520_wdt_init(void)
383{ 383{
384 int rc = -EBUSY; 384 int rc = -EBUSY;
385 385
386 spin_lock_init(&wdt_spinlock);
387
388 /* Check that the timeout value is within it's range ; if not reset to the default */ 386 /* Check that the timeout value is within it's range ; if not reset to the default */
389 if (wdt_set_heartbeat(timeout)) { 387 if (wdt_set_heartbeat(timeout)) {
390 wdt_set_heartbeat(WATCHDOG_TIMEOUT); 388 wdt_set_heartbeat(WATCHDOG_TIMEOUT);
diff --git a/drivers/watchdog/smsc37b787_wdt.c b/drivers/watchdog/smsc37b787_wdt.c
index d3cb0a766020..5d2b5ba61414 100644
--- a/drivers/watchdog/smsc37b787_wdt.c
+++ b/drivers/watchdog/smsc37b787_wdt.c
@@ -83,7 +83,7 @@ static unsigned long timer_enabled = 0; /* is the timer enabled? */
83 83
84static char expect_close; /* is the close expected? */ 84static char expect_close; /* is the close expected? */
85 85
86static spinlock_t io_lock; /* to guard the watchdog from io races */ 86static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */
87 87
88static int nowayout = WATCHDOG_NOWAYOUT; 88static int nowayout = WATCHDOG_NOWAYOUT;
89 89
@@ -540,8 +540,6 @@ static int __init wb_smsc_wdt_init(void)
540{ 540{
541 int ret; 541 int ret;
542 542
543 spin_lock_init(&io_lock);
544
545 printk("SMsC 37B787 watchdog component driver " VERSION " initialising...\n"); 543 printk("SMsC 37B787 watchdog component driver " VERSION " initialising...\n");
546 544
547 if (!request_region(IOPORT, IOPORT_SIZE, "SMsC 37B787 watchdog")) { 545 if (!request_region(IOPORT, IOPORT_SIZE, "SMsC 37B787 watchdog")) {
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
index df33b3b5a53c..386492821fc2 100644
--- a/drivers/watchdog/w83627hf_wdt.c
+++ b/drivers/watchdog/w83627hf_wdt.c
@@ -48,7 +48,7 @@
48 48
49static unsigned long wdt_is_open; 49static unsigned long wdt_is_open;
50static char expect_close; 50static char expect_close;
51static spinlock_t io_lock; 51static DEFINE_SPINLOCK(io_lock);
52 52
53/* You must set this - there is no sane way to probe for this board. */ 53/* You must set this - there is no sane way to probe for this board. */
54static int wdt_io = 0x2E; 54static int wdt_io = 0x2E;
@@ -328,8 +328,6 @@ wdt_init(void)
328{ 328{
329 int ret; 329 int ret;
330 330
331 spin_lock_init(&io_lock);
332
333 printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.\n"); 331 printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.\n");
334 332
335 if (wdt_set_heartbeat(timeout)) { 333 if (wdt_set_heartbeat(timeout)) {
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c
index 51826c216d6d..c622a0e6c9ae 100644
--- a/drivers/watchdog/w83697hf_wdt.c
+++ b/drivers/watchdog/w83697hf_wdt.c
@@ -47,7 +47,7 @@
47 47
48static unsigned long wdt_is_open; 48static unsigned long wdt_is_open;
49static char expect_close; 49static char expect_close;
50static spinlock_t io_lock; 50static DEFINE_SPINLOCK(io_lock);
51 51
52/* You must set this - there is no sane way to probe for this board. */ 52/* You must set this - there is no sane way to probe for this board. */
53static int wdt_io = 0x2e; 53static int wdt_io = 0x2e;
@@ -376,8 +376,6 @@ wdt_init(void)
376{ 376{
377 int ret, i, found = 0; 377 int ret, i, found = 0;
378 378
379 spin_lock_init(&io_lock);
380
381 printk (KERN_INFO PFX "WDT driver for W83697HF/HG initializing\n"); 379 printk (KERN_INFO PFX "WDT driver for W83697HF/HG initializing\n");
382 380
383 if (wdt_io == 0) { 381 if (wdt_io == 0) {
diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c
index 3c88fe18f4f4..bcc9d48955de 100644
--- a/drivers/watchdog/w83877f_wdt.c
+++ b/drivers/watchdog/w83877f_wdt.c
@@ -94,7 +94,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
94static unsigned long next_heartbeat; 94static unsigned long next_heartbeat;
95static unsigned long wdt_is_open; 95static unsigned long wdt_is_open;
96static char wdt_expect_close; 96static char wdt_expect_close;
97static spinlock_t wdt_spinlock; 97static DEFINE_SPINLOCK(wdt_spinlock);
98 98
99/* 99/*
100 * Whack the dog 100 * Whack the dog
@@ -350,8 +350,6 @@ static int __init w83877f_wdt_init(void)
350{ 350{
351 int rc = -EBUSY; 351 int rc = -EBUSY;
352 352
353 spin_lock_init(&wdt_spinlock);
354
355 if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */ 353 if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */
356 { 354 {
357 timeout = WATCHDOG_TIMEOUT; 355 timeout = WATCHDOG_TIMEOUT;
diff --git a/drivers/watchdog/w83977f_wdt.c b/drivers/watchdog/w83977f_wdt.c
index 157968442891..b475529d2475 100644
--- a/drivers/watchdog/w83977f_wdt.c
+++ b/drivers/watchdog/w83977f_wdt.c
@@ -50,7 +50,7 @@ static int timeoutW; /* timeout in watchdog counter units */
50static unsigned long timer_alive; 50static unsigned long timer_alive;
51static int testmode; 51static int testmode;
52static char expect_close; 52static char expect_close;
53static spinlock_t spinlock; 53static DEFINE_SPINLOCK(spinlock);
54 54
55module_param(timeout, int, 0); 55module_param(timeout, int, 0);
56MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); 56MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")");
@@ -476,8 +476,6 @@ static int __init w83977f_wdt_init(void)
476 476
477 printk(KERN_INFO PFX DRIVER_VERSION); 477 printk(KERN_INFO PFX DRIVER_VERSION);
478 478
479 spin_lock_init(&spinlock);
480
481 /* 479 /*
482 * Check that the timeout value is within it's range ; 480 * Check that the timeout value is within it's range ;
483 * if not reset to the default 481 * if not reset to the default
diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c
index 950905d3c39f..9e368091f799 100644
--- a/drivers/watchdog/wafer5823wdt.c
+++ b/drivers/watchdog/wafer5823wdt.c
@@ -45,7 +45,7 @@
45 45
46static unsigned long wafwdt_is_open; 46static unsigned long wafwdt_is_open;
47static char expect_close; 47static char expect_close;
48static spinlock_t wafwdt_lock; 48static DEFINE_SPINLOCK(wafwdt_lock);
49 49
50/* 50/*
51 * You must set these - there is no sane way to probe for this board. 51 * You must set these - there is no sane way to probe for this board.
@@ -252,8 +252,6 @@ static int __init wafwdt_init(void)
252 252
253 printk(KERN_INFO "WDT driver for Wafer 5823 single board computer initialising.\n"); 253 printk(KERN_INFO "WDT driver for Wafer 5823 single board computer initialising.\n");
254 254
255 spin_lock_init(&wafwdt_lock);
256
257 if (timeout < 1 || timeout > 255) { 255 if (timeout < 1 || timeout > 255) {
258 timeout = WD_TIMO; 256 timeout = WD_TIMO;
259 printk (KERN_INFO PFX "timeout value must be 1<=x<=255, using %d\n", 257 printk (KERN_INFO PFX "timeout value must be 1<=x<=255, using %d\n",
diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c
index 0a3de6a02442..53d0bb410df8 100644
--- a/drivers/watchdog/wdt.c
+++ b/drivers/watchdog/wdt.c
@@ -253,7 +253,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
253 printk(KERN_CRIT "Possible fan fault.\n"); 253 printk(KERN_CRIT "Possible fan fault.\n");
254 } 254 }
255#endif /* CONFIG_WDT_501 */ 255#endif /* CONFIG_WDT_501 */
256 if (!(status & WDC_SR_WCCR)) 256 if (!(status & WDC_SR_WCCR)) {
257#ifdef SOFTWARE_REBOOT 257#ifdef SOFTWARE_REBOOT
258#ifdef ONLY_TESTING 258#ifdef ONLY_TESTING
259 printk(KERN_CRIT "Would Reboot.\n"); 259 printk(KERN_CRIT "Would Reboot.\n");
@@ -264,6 +264,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
264#else 264#else
265 printk(KERN_CRIT "Reset in 5ms.\n"); 265 printk(KERN_CRIT "Reset in 5ms.\n");
266#endif 266#endif
267 }
267 return IRQ_HANDLED; 268 return IRQ_HANDLED;
268} 269}
269 270
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c
index 7d300ff7ab07..9b7f6b6edef6 100644
--- a/drivers/watchdog/wdt977.c
+++ b/drivers/watchdog/wdt977.c
@@ -59,7 +59,7 @@ static int timeoutM; /* timeout in minutes */
59static unsigned long timer_alive; 59static unsigned long timer_alive;
60static int testmode; 60static int testmode;
61static char expect_close; 61static char expect_close;
62static spinlock_t spinlock; 62static DEFINE_SPINLOCK(spinlock);
63 63
64module_param(timeout, int, 0); 64module_param(timeout, int, 0);
65MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); 65MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")");
@@ -448,8 +448,6 @@ static int __init wd977_init(void)
448 448
449 printk(KERN_INFO PFX DRIVER_VERSION); 449 printk(KERN_INFO PFX DRIVER_VERSION);
450 450
451 spin_lock_init(&spinlock);
452
453 /* Check that the timeout value is within it's range ; if not reset to the default */ 451 /* Check that the timeout value is within it's range ; if not reset to the default */
454 if (wdt977_set_timeout(timeout)) 452 if (wdt977_set_timeout(timeout))
455 { 453 {
diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c
index 6baf4ae42c9d..1355608683e4 100644
--- a/drivers/watchdog/wdt_pci.c
+++ b/drivers/watchdog/wdt_pci.c
@@ -74,7 +74,7 @@
74static int dev_count; 74static int dev_count;
75 75
76static struct semaphore open_sem; 76static struct semaphore open_sem;
77static spinlock_t wdtpci_lock; 77static DEFINE_SPINLOCK(wdtpci_lock);
78static char expect_close; 78static char expect_close;
79 79
80static int io; 80static int io;
@@ -298,7 +298,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
298 printk(KERN_CRIT PFX "Possible fan fault.\n"); 298 printk(KERN_CRIT PFX "Possible fan fault.\n");
299 } 299 }
300#endif /* CONFIG_WDT_501_PCI */ 300#endif /* CONFIG_WDT_501_PCI */
301 if (!(status&WDC_SR_WCCR)) 301 if (!(status&WDC_SR_WCCR)) {
302#ifdef SOFTWARE_REBOOT 302#ifdef SOFTWARE_REBOOT
303#ifdef ONLY_TESTING 303#ifdef ONLY_TESTING
304 printk(KERN_CRIT PFX "Would Reboot.\n"); 304 printk(KERN_CRIT PFX "Would Reboot.\n");
@@ -309,6 +309,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
309#else 309#else
310 printk(KERN_CRIT PFX "Reset in 5ms.\n"); 310 printk(KERN_CRIT PFX "Reset in 5ms.\n");
311#endif 311#endif
312 }
312 return IRQ_HANDLED; 313 return IRQ_HANDLED;
313} 314}
314 315
@@ -606,7 +607,6 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev,
606 } 607 }
607 608
608 sema_init(&open_sem, 1); 609 sema_init(&open_sem, 1);
609 spin_lock_init(&wdtpci_lock);
610 610
611 irq = dev->irq; 611 irq = dev->irq;
612 io = pci_resource_start (dev, 2); 612 io = pci_resource_start (dev, 2);