diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-05 18:22:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-05 18:22:26 -0500 |
commit | 28b4d5cc17c20786848cdc07b7ea237a309776bb (patch) | |
tree | bae406a4b17229dcce7c11be5073f7a67665e477 /drivers/isdn | |
parent | d29cecda036f251aee4947f47eea0fe9ed8cc931 (diff) | |
parent | 96fa2b508d2d3fe040cf4ef2fffb955f0a537ea1 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/wireless/ray_cs.c
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/hardware/avm/avm_cs.c | 4 | ||||
-rw-r--r-- | drivers/isdn/hisax/avma1_cs.c | 28 | ||||
-rw-r--r-- | drivers/isdn/hisax/elsa_cs.c | 46 | ||||
-rw-r--r-- | drivers/isdn/hisax/sedlbauer_cs.c | 64 | ||||
-rw-r--r-- | drivers/isdn/hisax/teles_cs.c | 38 |
5 files changed, 45 insertions, 135 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index c72565520e41..5a6ae646a636 100644 --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c | |||
@@ -111,8 +111,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev) | |||
111 | p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | 111 | p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; |
112 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 112 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; |
113 | 113 | ||
114 | p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
115 | |||
116 | /* General socket configuration */ | 114 | /* General socket configuration */ |
117 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 115 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
118 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 116 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
@@ -198,7 +196,6 @@ static int avmcs_config(struct pcmcia_device *link) | |||
198 | */ | 196 | */ |
199 | i = pcmcia_request_irq(link, &link->irq); | 197 | i = pcmcia_request_irq(link, &link->irq); |
200 | if (i != 0) { | 198 | if (i != 0) { |
201 | cs_error(link, RequestIRQ, i); | ||
202 | /* undo */ | 199 | /* undo */ |
203 | pcmcia_disable_device(link); | 200 | pcmcia_disable_device(link); |
204 | break; | 201 | break; |
@@ -209,7 +206,6 @@ static int avmcs_config(struct pcmcia_device *link) | |||
209 | */ | 206 | */ |
210 | i = pcmcia_request_configuration(link, &link->conf); | 207 | i = pcmcia_request_configuration(link, &link->conf); |
211 | if (i != 0) { | 208 | if (i != 0) { |
212 | cs_error(link, RequestConfiguration, i); | ||
213 | pcmcia_disable_device(link); | 209 | pcmcia_disable_device(link); |
214 | break; | 210 | break; |
215 | } | 211 | } |
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index 23560c897ec3..f9bdff39cf4a 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
@@ -30,22 +30,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for AVM A1/Fritz!PCMCIA car | |||
30 | MODULE_AUTHOR("Carsten Paeth"); | 30 | MODULE_AUTHOR("Carsten Paeth"); |
31 | MODULE_LICENSE("GPL"); | 31 | MODULE_LICENSE("GPL"); |
32 | 32 | ||
33 | /* | ||
34 | All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If | ||
35 | you do not define PCMCIA_DEBUG at all, all the debug code will be | ||
36 | left out. If you compile with PCMCIA_DEBUG=0, the debug code will | ||
37 | be present but disabled -- but it can then be enabled for specific | ||
38 | modules at load time with a 'pc_debug=#' option to insmod. | ||
39 | */ | ||
40 | #ifdef PCMCIA_DEBUG | ||
41 | static int pc_debug = PCMCIA_DEBUG; | ||
42 | module_param(pc_debug, int, 0); | ||
43 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); | ||
44 | static char *version = | ||
45 | "avma1_cs.c 1.00 1998/01/23 10:00:00 (Carsten Paeth)"; | ||
46 | #else | ||
47 | #define DEBUG(n, args...) | ||
48 | #endif | ||
49 | 33 | ||
50 | /*====================================================================*/ | 34 | /*====================================================================*/ |
51 | 35 | ||
@@ -119,7 +103,7 @@ static int avma1cs_probe(struct pcmcia_device *p_dev) | |||
119 | { | 103 | { |
120 | local_info_t *local; | 104 | local_info_t *local; |
121 | 105 | ||
122 | DEBUG(0, "avma1cs_attach()\n"); | 106 | dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); |
123 | 107 | ||
124 | /* Allocate space for private device-specific data */ | 108 | /* Allocate space for private device-specific data */ |
125 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); | 109 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
@@ -139,8 +123,6 @@ static int avma1cs_probe(struct pcmcia_device *p_dev) | |||
139 | p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | 123 | p_dev->irq.Attributes = IRQ_TYPE_EXCLUSIVE; |
140 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 124 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; |
141 | 125 | ||
142 | p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
143 | |||
144 | /* General socket configuration */ | 126 | /* General socket configuration */ |
145 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 127 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
146 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 128 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
@@ -161,7 +143,7 @@ static int avma1cs_probe(struct pcmcia_device *p_dev) | |||
161 | 143 | ||
162 | static void avma1cs_detach(struct pcmcia_device *link) | 144 | static void avma1cs_detach(struct pcmcia_device *link) |
163 | { | 145 | { |
164 | DEBUG(0, "avma1cs_detach(0x%p)\n", link); | 146 | dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); |
165 | avma1cs_release(link); | 147 | avma1cs_release(link); |
166 | kfree(link->priv); | 148 | kfree(link->priv); |
167 | } /* avma1cs_detach */ | 149 | } /* avma1cs_detach */ |
@@ -203,7 +185,7 @@ static int avma1cs_config(struct pcmcia_device *link) | |||
203 | 185 | ||
204 | dev = link->priv; | 186 | dev = link->priv; |
205 | 187 | ||
206 | DEBUG(0, "avma1cs_config(0x%p)\n", link); | 188 | dev_dbg(&link->dev, "avma1cs_config(0x%p)\n", link); |
207 | 189 | ||
208 | devname[0] = 0; | 190 | devname[0] = 0; |
209 | if (link->prod_id[1]) | 191 | if (link->prod_id[1]) |
@@ -218,7 +200,6 @@ static int avma1cs_config(struct pcmcia_device *link) | |||
218 | */ | 200 | */ |
219 | i = pcmcia_request_irq(link, &link->irq); | 201 | i = pcmcia_request_irq(link, &link->irq); |
220 | if (i != 0) { | 202 | if (i != 0) { |
221 | cs_error(link, RequestIRQ, i); | ||
222 | /* undo */ | 203 | /* undo */ |
223 | pcmcia_disable_device(link); | 204 | pcmcia_disable_device(link); |
224 | break; | 205 | break; |
@@ -229,7 +210,6 @@ static int avma1cs_config(struct pcmcia_device *link) | |||
229 | */ | 210 | */ |
230 | i = pcmcia_request_configuration(link, &link->conf); | 211 | i = pcmcia_request_configuration(link, &link->conf); |
231 | if (i != 0) { | 212 | if (i != 0) { |
232 | cs_error(link, RequestConfiguration, i); | ||
233 | pcmcia_disable_device(link); | 213 | pcmcia_disable_device(link); |
234 | break; | 214 | break; |
235 | } | 215 | } |
@@ -281,7 +261,7 @@ static void avma1cs_release(struct pcmcia_device *link) | |||
281 | { | 261 | { |
282 | local_info_t *local = link->priv; | 262 | local_info_t *local = link->priv; |
283 | 263 | ||
284 | DEBUG(0, "avma1cs_release(0x%p)\n", link); | 264 | dev_dbg(&link->dev, "avma1cs_release(0x%p)\n", link); |
285 | 265 | ||
286 | /* now unregister function with hisax */ | 266 | /* now unregister function with hisax */ |
287 | HiSax_closecard(local->node.minor); | 267 | HiSax_closecard(local->node.minor); |
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index f4d0fe29bcf8..a2f709f53974 100644 --- a/drivers/isdn/hisax/elsa_cs.c +++ b/drivers/isdn/hisax/elsa_cs.c | |||
@@ -57,23 +57,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Elsa PCM cards"); | |||
57 | MODULE_AUTHOR("Klaus Lichtenwalder"); | 57 | MODULE_AUTHOR("Klaus Lichtenwalder"); |
58 | MODULE_LICENSE("Dual MPL/GPL"); | 58 | MODULE_LICENSE("Dual MPL/GPL"); |
59 | 59 | ||
60 | /* | ||
61 | All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If | ||
62 | you do not define PCMCIA_DEBUG at all, all the debug code will be | ||
63 | left out. If you compile with PCMCIA_DEBUG=0, the debug code will | ||
64 | be present but disabled -- but it can then be enabled for specific | ||
65 | modules at load time with a 'pc_debug=#' option to insmod. | ||
66 | */ | ||
67 | |||
68 | #ifdef PCMCIA_DEBUG | ||
69 | static int pc_debug = PCMCIA_DEBUG; | ||
70 | module_param(pc_debug, int, 0); | ||
71 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); | ||
72 | static char *version = | ||
73 | "elsa_cs.c $Revision: 1.2.2.4 $ $Date: 2004/01/25 15:07:06 $ (K.Lichtenwalder)"; | ||
74 | #else | ||
75 | #define DEBUG(n, args...) | ||
76 | #endif | ||
77 | 60 | ||
78 | /*====================================================================*/ | 61 | /*====================================================================*/ |
79 | 62 | ||
@@ -142,7 +125,7 @@ static int elsa_cs_probe(struct pcmcia_device *link) | |||
142 | { | 125 | { |
143 | local_info_t *local; | 126 | local_info_t *local; |
144 | 127 | ||
145 | DEBUG(0, "elsa_cs_attach()\n"); | 128 | dev_dbg(&link->dev, "elsa_cs_attach()\n"); |
146 | 129 | ||
147 | /* Allocate space for private device-specific data */ | 130 | /* Allocate space for private device-specific data */ |
148 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); | 131 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
@@ -155,7 +138,6 @@ static int elsa_cs_probe(struct pcmcia_device *link) | |||
155 | 138 | ||
156 | /* Interrupt setup */ | 139 | /* Interrupt setup */ |
157 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 140 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; |
158 | link->irq.IRQInfo1 = IRQ_LEVEL_ID|IRQ_SHARE_ID; | ||
159 | link->irq.Handler = NULL; | 141 | link->irq.Handler = NULL; |
160 | 142 | ||
161 | /* | 143 | /* |
@@ -188,7 +170,7 @@ static void elsa_cs_detach(struct pcmcia_device *link) | |||
188 | { | 170 | { |
189 | local_info_t *info = link->priv; | 171 | local_info_t *info = link->priv; |
190 | 172 | ||
191 | DEBUG(0, "elsa_cs_detach(0x%p)\n", link); | 173 | dev_dbg(&link->dev, "elsa_cs_detach(0x%p)\n", link); |
192 | 174 | ||
193 | info->busy = 1; | 175 | info->busy = 1; |
194 | elsa_cs_release(link); | 176 | elsa_cs_release(link); |
@@ -231,30 +213,25 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev, | |||
231 | static int elsa_cs_config(struct pcmcia_device *link) | 213 | static int elsa_cs_config(struct pcmcia_device *link) |
232 | { | 214 | { |
233 | local_info_t *dev; | 215 | local_info_t *dev; |
234 | int i, last_fn; | 216 | int i; |
235 | IsdnCard_t icard; | 217 | IsdnCard_t icard; |
236 | 218 | ||
237 | DEBUG(0, "elsa_config(0x%p)\n", link); | 219 | dev_dbg(&link->dev, "elsa_config(0x%p)\n", link); |
238 | dev = link->priv; | 220 | dev = link->priv; |
239 | 221 | ||
240 | i = pcmcia_loop_config(link, elsa_cs_configcheck, NULL); | 222 | i = pcmcia_loop_config(link, elsa_cs_configcheck, NULL); |
241 | if (i != 0) { | 223 | if (i != 0) |
242 | last_fn = RequestIO; | 224 | goto failed; |
243 | goto cs_failed; | ||
244 | } | ||
245 | 225 | ||
246 | i = pcmcia_request_irq(link, &link->irq); | 226 | i = pcmcia_request_irq(link, &link->irq); |
247 | if (i != 0) { | 227 | if (i != 0) { |
248 | link->irq.AssignedIRQ = 0; | 228 | link->irq.AssignedIRQ = 0; |
249 | last_fn = RequestIRQ; | 229 | goto failed; |
250 | goto cs_failed; | ||
251 | } | 230 | } |
252 | 231 | ||
253 | i = pcmcia_request_configuration(link, &link->conf); | 232 | i = pcmcia_request_configuration(link, &link->conf); |
254 | if (i != 0) { | 233 | if (i != 0) |
255 | last_fn = RequestConfiguration; | 234 | goto failed; |
256 | goto cs_failed; | ||
257 | } | ||
258 | 235 | ||
259 | /* At this point, the dev_node_t structure(s) should be | 236 | /* At this point, the dev_node_t structure(s) should be |
260 | initialized and arranged in a linked list at link->dev. *//* */ | 237 | initialized and arranged in a linked list at link->dev. *//* */ |
@@ -290,8 +267,7 @@ static int elsa_cs_config(struct pcmcia_device *link) | |||
290 | ((local_info_t*)link->priv)->cardnr = i; | 267 | ((local_info_t*)link->priv)->cardnr = i; |
291 | 268 | ||
292 | return 0; | 269 | return 0; |
293 | cs_failed: | 270 | failed: |
294 | cs_error(link, last_fn, i); | ||
295 | elsa_cs_release(link); | 271 | elsa_cs_release(link); |
296 | return -ENODEV; | 272 | return -ENODEV; |
297 | } /* elsa_cs_config */ | 273 | } /* elsa_cs_config */ |
@@ -308,7 +284,7 @@ static void elsa_cs_release(struct pcmcia_device *link) | |||
308 | { | 284 | { |
309 | local_info_t *local = link->priv; | 285 | local_info_t *local = link->priv; |
310 | 286 | ||
311 | DEBUG(0, "elsa_cs_release(0x%p)\n", link); | 287 | dev_dbg(&link->dev, "elsa_cs_release(0x%p)\n", link); |
312 | 288 | ||
313 | if (local) { | 289 | if (local) { |
314 | if (local->cardnr >= 0) { | 290 | if (local->cardnr >= 0) { |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index 9a3c9f5e4fe8..af5d393cc2d0 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
@@ -57,24 +57,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Sedlbauer cards"); | |||
57 | MODULE_AUTHOR("Marcus Niemann"); | 57 | MODULE_AUTHOR("Marcus Niemann"); |
58 | MODULE_LICENSE("Dual MPL/GPL"); | 58 | MODULE_LICENSE("Dual MPL/GPL"); |
59 | 59 | ||
60 | /* | ||
61 | All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If | ||
62 | you do not define PCMCIA_DEBUG at all, all the debug code will be | ||
63 | left out. If you compile with PCMCIA_DEBUG=0, the debug code will | ||
64 | be present but disabled -- but it can then be enabled for specific | ||
65 | modules at load time with a 'pc_debug=#' option to insmod. | ||
66 | */ | ||
67 | |||
68 | #ifdef PCMCIA_DEBUG | ||
69 | static int pc_debug = PCMCIA_DEBUG; | ||
70 | module_param(pc_debug, int, 0); | ||
71 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); | ||
72 | static char *version = | ||
73 | "sedlbauer_cs.c 1.1a 2001/01/28 15:04:04 (M.Niemann)"; | ||
74 | #else | ||
75 | #define DEBUG(n, args...) | ||
76 | #endif | ||
77 | |||
78 | 60 | ||
79 | /*====================================================================*/ | 61 | /*====================================================================*/ |
80 | 62 | ||
@@ -151,7 +133,7 @@ static int sedlbauer_probe(struct pcmcia_device *link) | |||
151 | { | 133 | { |
152 | local_info_t *local; | 134 | local_info_t *local; |
153 | 135 | ||
154 | DEBUG(0, "sedlbauer_attach()\n"); | 136 | dev_dbg(&link->dev, "sedlbauer_attach()\n"); |
155 | 137 | ||
156 | /* Allocate space for private device-specific data */ | 138 | /* Allocate space for private device-specific data */ |
157 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); | 139 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
@@ -163,7 +145,6 @@ static int sedlbauer_probe(struct pcmcia_device *link) | |||
163 | 145 | ||
164 | /* Interrupt setup */ | 146 | /* Interrupt setup */ |
165 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 147 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; |
166 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
167 | link->irq.Handler = NULL; | 148 | link->irq.Handler = NULL; |
168 | 149 | ||
169 | /* | 150 | /* |
@@ -198,7 +179,7 @@ static int sedlbauer_probe(struct pcmcia_device *link) | |||
198 | 179 | ||
199 | static void sedlbauer_detach(struct pcmcia_device *link) | 180 | static void sedlbauer_detach(struct pcmcia_device *link) |
200 | { | 181 | { |
201 | DEBUG(0, "sedlbauer_detach(0x%p)\n", link); | 182 | dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); |
202 | 183 | ||
203 | ((local_info_t *)link->priv)->stop = 1; | 184 | ((local_info_t *)link->priv)->stop = 1; |
204 | sedlbauer_release(link); | 185 | sedlbauer_release(link); |
@@ -214,9 +195,6 @@ static void sedlbauer_detach(struct pcmcia_device *link) | |||
214 | device available to the system. | 195 | device available to the system. |
215 | 196 | ||
216 | ======================================================================*/ | 197 | ======================================================================*/ |
217 | #define CS_CHECK(fn, ret) \ | ||
218 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | ||
219 | |||
220 | static int sedlbauer_config_check(struct pcmcia_device *p_dev, | 198 | static int sedlbauer_config_check(struct pcmcia_device *p_dev, |
221 | cistpl_cftable_entry_t *cfg, | 199 | cistpl_cftable_entry_t *cfg, |
222 | cistpl_cftable_entry_t *dflt, | 200 | cistpl_cftable_entry_t *dflt, |
@@ -293,11 +271,11 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, | |||
293 | req->Base = mem->win[0].host_addr; | 271 | req->Base = mem->win[0].host_addr; |
294 | req->Size = mem->win[0].len; | 272 | req->Size = mem->win[0].len; |
295 | req->AccessSpeed = 0; | 273 | req->AccessSpeed = 0; |
296 | if (pcmcia_request_window(&p_dev, req, &p_dev->win) != 0) | 274 | if (pcmcia_request_window(p_dev, req, &p_dev->win) != 0) |
297 | return -ENODEV; | 275 | return -ENODEV; |
298 | map.Page = 0; | 276 | map.Page = 0; |
299 | map.CardOffset = mem->win[0].card_addr; | 277 | map.CardOffset = mem->win[0].card_addr; |
300 | if (pcmcia_map_mem_page(p_dev->win, &map) != 0) | 278 | if (pcmcia_map_mem_page(p_dev, p_dev->win, &map) != 0) |
301 | return -ENODEV; | 279 | return -ENODEV; |
302 | } | 280 | } |
303 | return 0; | 281 | return 0; |
@@ -309,10 +287,10 @@ static int sedlbauer_config(struct pcmcia_device *link) | |||
309 | { | 287 | { |
310 | local_info_t *dev = link->priv; | 288 | local_info_t *dev = link->priv; |
311 | win_req_t *req; | 289 | win_req_t *req; |
312 | int last_fn, last_ret; | 290 | int ret; |
313 | IsdnCard_t icard; | 291 | IsdnCard_t icard; |
314 | 292 | ||
315 | DEBUG(0, "sedlbauer_config(0x%p)\n", link); | 293 | dev_dbg(&link->dev, "sedlbauer_config(0x%p)\n", link); |
316 | 294 | ||
317 | req = kzalloc(sizeof(win_req_t), GFP_KERNEL); | 295 | req = kzalloc(sizeof(win_req_t), GFP_KERNEL); |
318 | if (!req) | 296 | if (!req) |
@@ -330,8 +308,8 @@ static int sedlbauer_config(struct pcmcia_device *link) | |||
330 | these things without consulting the CIS, and most client drivers | 308 | these things without consulting the CIS, and most client drivers |
331 | will only use the CIS to fill in implementation-defined details. | 309 | will only use the CIS to fill in implementation-defined details. |
332 | */ | 310 | */ |
333 | last_ret = pcmcia_loop_config(link, sedlbauer_config_check, req); | 311 | ret = pcmcia_loop_config(link, sedlbauer_config_check, req); |
334 | if (last_ret) | 312 | if (ret) |
335 | goto failed; | 313 | goto failed; |
336 | 314 | ||
337 | /* | 315 | /* |
@@ -339,15 +317,20 @@ static int sedlbauer_config(struct pcmcia_device *link) | |||
339 | handler to the interrupt, unless the 'Handler' member of the | 317 | handler to the interrupt, unless the 'Handler' member of the |
340 | irq structure is initialized. | 318 | irq structure is initialized. |
341 | */ | 319 | */ |
342 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 320 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { |
343 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | 321 | ret = pcmcia_request_irq(link, &link->irq); |
322 | if (ret) | ||
323 | goto failed; | ||
324 | } | ||
344 | 325 | ||
345 | /* | 326 | /* |
346 | This actually configures the PCMCIA socket -- setting up | 327 | This actually configures the PCMCIA socket -- setting up |
347 | the I/O windows and the interrupt mapping, and putting the | 328 | the I/O windows and the interrupt mapping, and putting the |
348 | card and host interface into "Memory and IO" mode. | 329 | card and host interface into "Memory and IO" mode. |
349 | */ | 330 | */ |
350 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 331 | ret = pcmcia_request_configuration(link, &link->conf); |
332 | if (ret) | ||
333 | goto failed; | ||
351 | 334 | ||
352 | /* | 335 | /* |
353 | At this point, the dev_node_t structure(s) need to be | 336 | At this point, the dev_node_t structure(s) need to be |
@@ -380,19 +363,18 @@ static int sedlbauer_config(struct pcmcia_device *link) | |||
380 | icard.protocol = protocol; | 363 | icard.protocol = protocol; |
381 | icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; | 364 | icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; |
382 | 365 | ||
383 | last_ret = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->stop), &icard); | 366 | ret = hisax_init_pcmcia(link, |
384 | if (last_ret < 0) { | 367 | &(((local_info_t *)link->priv)->stop), &icard); |
385 | printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n", | 368 | if (ret < 0) { |
386 | last_ret, link->io.BasePort1); | 369 | printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n", |
370 | ret, link->io.BasePort1); | ||
387 | sedlbauer_release(link); | 371 | sedlbauer_release(link); |
388 | return -ENODEV; | 372 | return -ENODEV; |
389 | } else | 373 | } else |
390 | ((local_info_t*)link->priv)->cardnr = last_ret; | 374 | ((local_info_t *)link->priv)->cardnr = ret; |
391 | 375 | ||
392 | return 0; | 376 | return 0; |
393 | 377 | ||
394 | cs_failed: | ||
395 | cs_error(link, last_fn, last_ret); | ||
396 | failed: | 378 | failed: |
397 | sedlbauer_release(link); | 379 | sedlbauer_release(link); |
398 | return -ENODEV; | 380 | return -ENODEV; |
@@ -410,7 +392,7 @@ failed: | |||
410 | static void sedlbauer_release(struct pcmcia_device *link) | 392 | static void sedlbauer_release(struct pcmcia_device *link) |
411 | { | 393 | { |
412 | local_info_t *local = link->priv; | 394 | local_info_t *local = link->priv; |
413 | DEBUG(0, "sedlbauer_release(0x%p)\n", link); | 395 | dev_dbg(&link->dev, "sedlbauer_release(0x%p)\n", link); |
414 | 396 | ||
415 | if (local) { | 397 | if (local) { |
416 | if (local->cardnr >= 0) { | 398 | if (local->cardnr >= 0) { |
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index 623d111544d4..ea705394ce2b 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
@@ -38,23 +38,6 @@ MODULE_DESCRIPTION("ISDN4Linux: PCMCIA client driver for Teles PCMCIA cards"); | |||
38 | MODULE_AUTHOR("Christof Petig, christof.petig@wtal.de, Karsten Keil, kkeil@suse.de"); | 38 | MODULE_AUTHOR("Christof Petig, christof.petig@wtal.de, Karsten Keil, kkeil@suse.de"); |
39 | MODULE_LICENSE("GPL"); | 39 | MODULE_LICENSE("GPL"); |
40 | 40 | ||
41 | /* | ||
42 | All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If | ||
43 | you do not define PCMCIA_DEBUG at all, all the debug code will be | ||
44 | left out. If you compile with PCMCIA_DEBUG=0, the debug code will | ||
45 | be present but disabled -- but it can then be enabled for specific | ||
46 | modules at load time with a 'pc_debug=#' option to insmod. | ||
47 | */ | ||
48 | |||
49 | #ifdef PCMCIA_DEBUG | ||
50 | static int pc_debug = PCMCIA_DEBUG; | ||
51 | module_param(pc_debug, int, 0); | ||
52 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); | ||
53 | static char *version = | ||
54 | "teles_cs.c 2.10 2002/07/30 22:23:34 kkeil"; | ||
55 | #else | ||
56 | #define DEBUG(n, args...) | ||
57 | #endif | ||
58 | 41 | ||
59 | /*====================================================================*/ | 42 | /*====================================================================*/ |
60 | 43 | ||
@@ -133,7 +116,7 @@ static int teles_probe(struct pcmcia_device *link) | |||
133 | { | 116 | { |
134 | local_info_t *local; | 117 | local_info_t *local; |
135 | 118 | ||
136 | DEBUG(0, "teles_attach()\n"); | 119 | dev_dbg(&link->dev, "teles_attach()\n"); |
137 | 120 | ||
138 | /* Allocate space for private device-specific data */ | 121 | /* Allocate space for private device-specific data */ |
139 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); | 122 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
@@ -145,7 +128,6 @@ static int teles_probe(struct pcmcia_device *link) | |||
145 | 128 | ||
146 | /* Interrupt setup */ | 129 | /* Interrupt setup */ |
147 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 130 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; |
148 | link->irq.IRQInfo1 = IRQ_LEVEL_ID|IRQ_SHARE_ID; | ||
149 | link->irq.Handler = NULL; | 131 | link->irq.Handler = NULL; |
150 | 132 | ||
151 | /* | 133 | /* |
@@ -178,7 +160,7 @@ static void teles_detach(struct pcmcia_device *link) | |||
178 | { | 160 | { |
179 | local_info_t *info = link->priv; | 161 | local_info_t *info = link->priv; |
180 | 162 | ||
181 | DEBUG(0, "teles_detach(0x%p)\n", link); | 163 | dev_dbg(&link->dev, "teles_detach(0x%p)\n", link); |
182 | 164 | ||
183 | info->busy = 1; | 165 | info->busy = 1; |
184 | teles_cs_release(link); | 166 | teles_cs_release(link); |
@@ -221,30 +203,25 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev, | |||
221 | static int teles_cs_config(struct pcmcia_device *link) | 203 | static int teles_cs_config(struct pcmcia_device *link) |
222 | { | 204 | { |
223 | local_info_t *dev; | 205 | local_info_t *dev; |
224 | int i, last_fn; | 206 | int i; |
225 | IsdnCard_t icard; | 207 | IsdnCard_t icard; |
226 | 208 | ||
227 | DEBUG(0, "teles_config(0x%p)\n", link); | 209 | dev_dbg(&link->dev, "teles_config(0x%p)\n", link); |
228 | dev = link->priv; | 210 | dev = link->priv; |
229 | 211 | ||
230 | i = pcmcia_loop_config(link, teles_cs_configcheck, NULL); | 212 | i = pcmcia_loop_config(link, teles_cs_configcheck, NULL); |
231 | if (i != 0) { | 213 | if (i != 0) |
232 | last_fn = RequestIO; | ||
233 | goto cs_failed; | 214 | goto cs_failed; |
234 | } | ||
235 | 215 | ||
236 | i = pcmcia_request_irq(link, &link->irq); | 216 | i = pcmcia_request_irq(link, &link->irq); |
237 | if (i != 0) { | 217 | if (i != 0) { |
238 | link->irq.AssignedIRQ = 0; | 218 | link->irq.AssignedIRQ = 0; |
239 | last_fn = RequestIRQ; | ||
240 | goto cs_failed; | 219 | goto cs_failed; |
241 | } | 220 | } |
242 | 221 | ||
243 | i = pcmcia_request_configuration(link, &link->conf); | 222 | i = pcmcia_request_configuration(link, &link->conf); |
244 | if (i != 0) { | 223 | if (i != 0) |
245 | last_fn = RequestConfiguration; | ||
246 | goto cs_failed; | 224 | goto cs_failed; |
247 | } | ||
248 | 225 | ||
249 | /* At this point, the dev_node_t structure(s) should be | 226 | /* At this point, the dev_node_t structure(s) should be |
250 | initialized and arranged in a linked list at link->dev. *//* */ | 227 | initialized and arranged in a linked list at link->dev. *//* */ |
@@ -283,7 +260,6 @@ static int teles_cs_config(struct pcmcia_device *link) | |||
283 | return 0; | 260 | return 0; |
284 | 261 | ||
285 | cs_failed: | 262 | cs_failed: |
286 | cs_error(link, last_fn, i); | ||
287 | teles_cs_release(link); | 263 | teles_cs_release(link); |
288 | return -ENODEV; | 264 | return -ENODEV; |
289 | } /* teles_cs_config */ | 265 | } /* teles_cs_config */ |
@@ -300,7 +276,7 @@ static void teles_cs_release(struct pcmcia_device *link) | |||
300 | { | 276 | { |
301 | local_info_t *local = link->priv; | 277 | local_info_t *local = link->priv; |
302 | 278 | ||
303 | DEBUG(0, "teles_cs_release(0x%p)\n", link); | 279 | dev_dbg(&link->dev, "teles_cs_release(0x%p)\n", link); |
304 | 280 | ||
305 | if (local) { | 281 | if (local) { |
306 | if (local->cardnr >= 0) { | 282 | if (local->cardnr >= 0) { |