diff options
Diffstat (limited to 'drivers/isdn/hisax/teles_cs.c')
| -rw-r--r-- | drivers/isdn/hisax/teles_cs.c | 38 |
1 files changed, 7 insertions, 31 deletions
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) { |
