diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/alim1535_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/davinci_wdt.c | 6 | ||||
-rw-r--r-- | drivers/watchdog/i6300esb.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/iTCO_wdt.c | 114 | ||||
-rw-r--r-- | drivers/watchdog/ib700wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/machzwd.c | 7 | ||||
-rw-r--r-- | drivers/watchdog/mpc83xx_wdt.c | 5 | ||||
-rw-r--r-- | drivers/watchdog/pc87413_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/pnx4008_wdt.c | 6 | ||||
-rw-r--r-- | drivers/watchdog/sbc8360.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/sc1200wdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/sc520_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/smsc37b787_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/w83627hf_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/w83697hf_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/w83877f_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/w83977f_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/wafer5823wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/wdt.c | 3 | ||||
-rw-r--r-- | drivers/watchdog/wdt977.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/wdt_pci.c | 6 |
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; | |||
31 | static char ali_expect_release; | 31 | static char ali_expect_release; |
32 | static struct pci_dev *ali_pci; | 32 | static struct pci_dev *ali_pci; |
33 | static u32 ali_timeout_bits; /* stores the computed timeout */ | 33 | static u32 ali_timeout_bits; /* stores the computed timeout */ |
34 | static spinlock_t ali_lock; /* Guards the hardware */ | 34 | static DEFINE_SPINLOCK(ali_lock); /* Guards the hardware */ |
35 | 35 | ||
36 | /* module parameters */ | 36 | /* module parameters */ |
37 | static int timeout = WATCHDOG_TIMEOUT; | 37 | static 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 | ||
62 | static int heartbeat = DEFAULT_HEARTBEAT; | 62 | static int heartbeat = DEFAULT_HEARTBEAT; |
63 | 63 | ||
64 | static spinlock_t io_lock; | 64 | static DEFINE_SPINLOCK(io_lock); |
65 | static unsigned long wdt_status; | 65 | static 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 | ||
263 | static void __exit davinci_wdt_exit(void) | 261 | static 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 | ||
268 | module_init(davinci_wdt_init); | 266 | module_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 */ |
79 | static void __iomem *BASEADDR; | 79 | static void __iomem *BASEADDR; |
80 | static spinlock_t esb_lock; /* Guards the hardware */ | 80 | static DEFINE_SPINLOCK(esb_lock); /* Guards the hardware */ |
81 | static unsigned long timer_alive; | 81 | static unsigned long timer_alive; |
82 | static struct pci_dev *esb_pci; | 82 | static struct pci_dev *esb_pci; |
83 | static unsigned short triggered; /* The status of the watchdog upon boot */ | 83 | static 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 | */ |
143 | static struct pci_device_id iTCO_wdt_pci_tbl[] = { | 158 | static 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 | }; |
185 | MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl); | 202 | MODULE_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 | ||
593 | static int iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev) | 611 | static 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 | ||
697 | static void iTCO_wdt_cleanup(void) | 715 | static 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 | ||
712 | static int iTCO_wdt_probe(struct platform_device *dev) | 730 | static 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 | ||
738 | static int iTCO_wdt_remove(struct platform_device *dev) | 756 | static 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 | ||
754 | static struct platform_driver iTCO_wdt_driver = { | 772 | static 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 | ||
49 | static struct platform_device *ibwdt_platform_device; | 49 | static struct platform_device *ibwdt_platform_device; |
50 | static unsigned long ibwdt_is_open; | 50 | static unsigned long ibwdt_is_open; |
51 | static spinlock_t ibwdt_lock; | 51 | static DEFINE_SPINLOCK(ibwdt_lock); |
52 | static char expect_close; | 52 | static 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); | |||
123 | static int zf_action = GEN_RESET; | 123 | static int zf_action = GEN_RESET; |
124 | static unsigned long zf_is_open; | 124 | static unsigned long zf_is_open; |
125 | static char zf_expect_close; | 125 | static char zf_expect_close; |
126 | static spinlock_t zf_lock; | 126 | static DEFINE_SPINLOCK(zf_lock); |
127 | static spinlock_t zf_port_lock; | 127 | static DEFINE_SPINLOCK(zf_port_lock); |
128 | static DEFINE_TIMER(zf_timer, zf_ping, 0, 0); | 128 | static DEFINE_TIMER(zf_timer, zf_ping, 0, 0); |
129 | static unsigned long next_heartbeat = 0; | 129 | static 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; | |||
56 | static unsigned int timeout_sec; | 56 | static unsigned int timeout_sec; |
57 | 57 | ||
58 | static unsigned long wdt_is_open; | 58 | static unsigned long wdt_is_open; |
59 | static spinlock_t wdt_spinlock; | 59 | static DEFINE_SPINLOCK(wdt_spinlock); |
60 | 60 | ||
61 | static void mpc83xx_wdt_keepalive(void) | 61 | static 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 | ||
193 | err_unmap: | 190 | err_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 | ||
62 | static char expect_close; /* is the close expected? */ | 62 | static char expect_close; /* is the close expected? */ |
63 | 63 | ||
64 | static spinlock_t io_lock; /* to guard the watchdog from io races */ | 64 | static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */ |
65 | 65 | ||
66 | static int nowayout = WATCHDOG_NOWAYOUT; | 66 | static 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 @@ | |||
80 | static int nowayout = WATCHDOG_NOWAYOUT; | 80 | static int nowayout = WATCHDOG_NOWAYOUT; |
81 | static int heartbeat = DEFAULT_HEARTBEAT; | 81 | static int heartbeat = DEFAULT_HEARTBEAT; |
82 | 82 | ||
83 | static spinlock_t io_lock; | 83 | static DEFINE_SPINLOCK(io_lock); |
84 | static unsigned long wdt_status; | 84 | static 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 | ||
336 | static void __exit pnx4008_wdt_exit(void) | 334 | static 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 | ||
341 | module_init(pnx4008_wdt_init); | 339 | module_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 | ||
56 | static unsigned long sbc8360_is_open; | 56 | static unsigned long sbc8360_is_open; |
57 | static spinlock_t sbc8360_lock; | 57 | static DEFINE_SPINLOCK(sbc8360_lock); |
58 | static char expect_close; | 58 | static 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; | |||
74 | static int io_len = 2; /* for non plug and play */ | 74 | static int io_len = 2; /* for non plug and play */ |
75 | static struct semaphore open_sem; | 75 | static struct semaphore open_sem; |
76 | static char expect_close; | 76 | static char expect_close; |
77 | static spinlock_t sc1200wdt_lock; /* io port access serialisation */ | 77 | static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */ |
78 | 78 | ||
79 | #if defined CONFIG_PNP | 79 | #if defined CONFIG_PNP |
80 | static int isapnp = 1; | 80 | static 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); | |||
125 | static unsigned long next_heartbeat; | 125 | static unsigned long next_heartbeat; |
126 | static unsigned long wdt_is_open; | 126 | static unsigned long wdt_is_open; |
127 | static char wdt_expect_close; | 127 | static char wdt_expect_close; |
128 | static spinlock_t wdt_spinlock; | 128 | static 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 | ||
84 | static char expect_close; /* is the close expected? */ | 84 | static char expect_close; /* is the close expected? */ |
85 | 85 | ||
86 | static spinlock_t io_lock; /* to guard the watchdog from io races */ | 86 | static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */ |
87 | 87 | ||
88 | static int nowayout = WATCHDOG_NOWAYOUT; | 88 | static 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 | ||
49 | static unsigned long wdt_is_open; | 49 | static unsigned long wdt_is_open; |
50 | static char expect_close; | 50 | static char expect_close; |
51 | static spinlock_t io_lock; | 51 | static 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. */ |
54 | static int wdt_io = 0x2E; | 54 | static 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 | ||
48 | static unsigned long wdt_is_open; | 48 | static unsigned long wdt_is_open; |
49 | static char expect_close; | 49 | static char expect_close; |
50 | static spinlock_t io_lock; | 50 | static 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. */ |
53 | static int wdt_io = 0x2e; | 53 | static 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); | |||
94 | static unsigned long next_heartbeat; | 94 | static unsigned long next_heartbeat; |
95 | static unsigned long wdt_is_open; | 95 | static unsigned long wdt_is_open; |
96 | static char wdt_expect_close; | 96 | static char wdt_expect_close; |
97 | static spinlock_t wdt_spinlock; | 97 | static 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 */ | |||
50 | static unsigned long timer_alive; | 50 | static unsigned long timer_alive; |
51 | static int testmode; | 51 | static int testmode; |
52 | static char expect_close; | 52 | static char expect_close; |
53 | static spinlock_t spinlock; | 53 | static DEFINE_SPINLOCK(spinlock); |
54 | 54 | ||
55 | module_param(timeout, int, 0); | 55 | module_param(timeout, int, 0); |
56 | MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); | 56 | MODULE_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 | ||
46 | static unsigned long wafwdt_is_open; | 46 | static unsigned long wafwdt_is_open; |
47 | static char expect_close; | 47 | static char expect_close; |
48 | static spinlock_t wafwdt_lock; | 48 | static 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 */ | |||
59 | static unsigned long timer_alive; | 59 | static unsigned long timer_alive; |
60 | static int testmode; | 60 | static int testmode; |
61 | static char expect_close; | 61 | static char expect_close; |
62 | static spinlock_t spinlock; | 62 | static DEFINE_SPINLOCK(spinlock); |
63 | 63 | ||
64 | module_param(timeout, int, 0); | 64 | module_param(timeout, int, 0); |
65 | MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); | 65 | MODULE_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 @@ | |||
74 | static int dev_count; | 74 | static int dev_count; |
75 | 75 | ||
76 | static struct semaphore open_sem; | 76 | static struct semaphore open_sem; |
77 | static spinlock_t wdtpci_lock; | 77 | static DEFINE_SPINLOCK(wdtpci_lock); |
78 | static char expect_close; | 78 | static char expect_close; |
79 | 79 | ||
80 | static int io; | 80 | static 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); |