diff options
35 files changed, 3 insertions, 1526 deletions
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index 54702cc8e0d4..404843e8611b 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
| @@ -71,17 +71,6 @@ static int ide_config(struct pcmcia_device *); | |||
| 71 | 71 | ||
| 72 | static void ide_detach(struct pcmcia_device *p_dev); | 72 | static void ide_detach(struct pcmcia_device *p_dev); |
| 73 | 73 | ||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | /*====================================================================== | ||
| 78 | |||
| 79 | ide_attach() creates an "instance" of the driver, allocating | ||
| 80 | local data structures for one device. The device is registered | ||
| 81 | with Card Services. | ||
| 82 | |||
| 83 | ======================================================================*/ | ||
| 84 | |||
| 85 | static int ide_probe(struct pcmcia_device *link) | 74 | static int ide_probe(struct pcmcia_device *link) |
| 86 | { | 75 | { |
| 87 | ide_info_t *info; | 76 | ide_info_t *info; |
| @@ -102,15 +91,6 @@ static int ide_probe(struct pcmcia_device *link) | |||
| 102 | return ide_config(link); | 91 | return ide_config(link); |
| 103 | } /* ide_attach */ | 92 | } /* ide_attach */ |
| 104 | 93 | ||
| 105 | /*====================================================================== | ||
| 106 | |||
| 107 | This deletes a driver "instance". The device is de-registered | ||
| 108 | with Card Services. If it has been released, all local data | ||
| 109 | structures are freed. Otherwise, the structures will be freed | ||
| 110 | when the device is released. | ||
| 111 | |||
| 112 | ======================================================================*/ | ||
| 113 | |||
| 114 | static void ide_detach(struct pcmcia_device *link) | 94 | static void ide_detach(struct pcmcia_device *link) |
| 115 | { | 95 | { |
| 116 | ide_info_t *info = link->priv; | 96 | ide_info_t *info = link->priv; |
| @@ -184,14 +164,6 @@ out_release: | |||
| 184 | return NULL; | 164 | return NULL; |
| 185 | } | 165 | } |
| 186 | 166 | ||
| 187 | /*====================================================================== | ||
| 188 | |||
| 189 | ide_config() is scheduled to run after a CARD_INSERTION event | ||
| 190 | is received, to configure the PCMCIA socket, and to make the | ||
| 191 | ide device available to the system. | ||
| 192 | |||
| 193 | ======================================================================*/ | ||
| 194 | |||
| 195 | static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data) | 167 | static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data) |
| 196 | { | 168 | { |
| 197 | int *is_kme = priv_data; | 169 | int *is_kme = priv_data; |
| @@ -275,14 +247,6 @@ failed: | |||
| 275 | return -ENODEV; | 247 | return -ENODEV; |
| 276 | } /* ide_config */ | 248 | } /* ide_config */ |
| 277 | 249 | ||
| 278 | /*====================================================================== | ||
| 279 | |||
| 280 | After a card is removed, ide_release() will unregister the net | ||
| 281 | device, and release the PCMCIA configuration. If the device is | ||
| 282 | still open, this will be postponed until it is closed. | ||
| 283 | |||
| 284 | ======================================================================*/ | ||
| 285 | |||
| 286 | static void ide_release(struct pcmcia_device *link) | 250 | static void ide_release(struct pcmcia_device *link) |
| 287 | { | 251 | { |
| 288 | ide_info_t *info = link->priv; | 252 | ide_info_t *info = link->priv; |
| @@ -308,15 +272,6 @@ static void ide_release(struct pcmcia_device *link) | |||
| 308 | } /* ide_release */ | 272 | } /* ide_release */ |
| 309 | 273 | ||
| 310 | 274 | ||
| 311 | /*====================================================================== | ||
| 312 | |||
| 313 | The card status event handler. Mostly, this schedules other | ||
| 314 | stuff to run after an event is received. A CARD_REMOVAL event | ||
| 315 | also sets some flags to discourage the ide drivers from | ||
| 316 | talking to the ports. | ||
| 317 | |||
| 318 | ======================================================================*/ | ||
| 319 | |||
| 320 | static struct pcmcia_device_id ide_ids[] = { | 275 | static struct pcmcia_device_id ide_ids[] = { |
| 321 | PCMCIA_DEVICE_FUNC_ID(4), | 276 | PCMCIA_DEVICE_FUNC_ID(4), |
| 322 | PCMCIA_DEVICE_MANF_CARD(0x0000, 0x0000), /* Corsair */ | 277 | PCMCIA_DEVICE_MANF_CARD(0x0000, 0x0000), /* Corsair */ |
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index b172361bbef8..91f06a3ef002 100644 --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c | |||
| @@ -38,38 +38,10 @@ MODULE_LICENSE("GPL"); | |||
| 38 | 38 | ||
| 39 | /*====================================================================*/ | 39 | /*====================================================================*/ |
| 40 | 40 | ||
| 41 | /* | ||
| 42 | The event() function is this driver's Card Services event handler. | ||
| 43 | It will be called by Card Services when an appropriate card status | ||
| 44 | event is received. The config() and release() entry points are | ||
| 45 | used to configure or release a socket, in response to card insertion | ||
| 46 | and ejection events. They are invoked from the skeleton event | ||
| 47 | handler. | ||
| 48 | */ | ||
| 49 | |||
| 50 | static int avmcs_config(struct pcmcia_device *link); | 41 | static int avmcs_config(struct pcmcia_device *link); |
| 51 | static void avmcs_release(struct pcmcia_device *link); | 42 | static void avmcs_release(struct pcmcia_device *link); |
| 52 | |||
| 53 | /* | ||
| 54 | The attach() and detach() entry points are used to create and destroy | ||
| 55 | "instances" of the driver, where each instance represents everything | ||
| 56 | needed to manage one actual PCMCIA card. | ||
| 57 | */ | ||
| 58 | |||
| 59 | static void avmcs_detach(struct pcmcia_device *p_dev); | 43 | static void avmcs_detach(struct pcmcia_device *p_dev); |
| 60 | 44 | ||
| 61 | /*====================================================================== | ||
| 62 | |||
| 63 | avmcs_attach() creates an "instance" of the driver, allocating | ||
| 64 | local data structures for one device. The device is registered | ||
| 65 | with Card Services. | ||
| 66 | |||
| 67 | The dev_link structure is initialized, but we don't actually | ||
| 68 | configure the card at this point -- we wait until we receive a | ||
| 69 | card insertion event. | ||
| 70 | |||
| 71 | ======================================================================*/ | ||
| 72 | |||
| 73 | static int avmcs_probe(struct pcmcia_device *p_dev) | 45 | static int avmcs_probe(struct pcmcia_device *p_dev) |
| 74 | { | 46 | { |
| 75 | /* General socket configuration */ | 47 | /* General socket configuration */ |
| @@ -80,28 +52,12 @@ static int avmcs_probe(struct pcmcia_device *p_dev) | |||
| 80 | return avmcs_config(p_dev); | 52 | return avmcs_config(p_dev); |
| 81 | } /* avmcs_attach */ | 53 | } /* avmcs_attach */ |
| 82 | 54 | ||
| 83 | /*====================================================================== | ||
| 84 | |||
| 85 | This deletes a driver "instance". The device is de-registered | ||
| 86 | with Card Services. If it has been released, all local data | ||
| 87 | structures are freed. Otherwise, the structures will be freed | ||
| 88 | when the device is released. | ||
| 89 | |||
| 90 | ======================================================================*/ | ||
| 91 | 55 | ||
| 92 | static void avmcs_detach(struct pcmcia_device *link) | 56 | static void avmcs_detach(struct pcmcia_device *link) |
| 93 | { | 57 | { |
| 94 | avmcs_release(link); | 58 | avmcs_release(link); |
| 95 | } /* avmcs_detach */ | 59 | } /* avmcs_detach */ |
| 96 | 60 | ||
| 97 | /*====================================================================== | ||
| 98 | |||
| 99 | avmcs_config() is scheduled to run after a CARD_INSERTION event | ||
| 100 | is received, to configure the PCMCIA socket, and to make the | ||
| 101 | ethernet device available to the system. | ||
| 102 | |||
| 103 | ======================================================================*/ | ||
| 104 | |||
| 105 | static int avmcs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | 61 | static int avmcs_configcheck(struct pcmcia_device *p_dev, void *priv_data) |
| 106 | { | 62 | { |
| 107 | p_dev->resource[0]->end = 16; | 63 | p_dev->resource[0]->end = 16; |
| @@ -185,13 +141,6 @@ static int avmcs_config(struct pcmcia_device *link) | |||
| 185 | 141 | ||
| 186 | } /* avmcs_config */ | 142 | } /* avmcs_config */ |
| 187 | 143 | ||
| 188 | /*====================================================================== | ||
| 189 | |||
| 190 | After a card is removed, avmcs_release() will unregister the net | ||
| 191 | device, and release the PCMCIA configuration. If the device is | ||
| 192 | still open, this will be postponed until it is closed. | ||
| 193 | |||
| 194 | ======================================================================*/ | ||
| 195 | 144 | ||
| 196 | static void avmcs_release(struct pcmcia_device *link) | 145 | static void avmcs_release(struct pcmcia_device *link) |
| 197 | { | 146 | { |
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index 62616c871c78..ac4dd7857cbd 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
| @@ -39,39 +39,10 @@ module_param(isdnprot, int, 0); | |||
| 39 | 39 | ||
| 40 | /*====================================================================*/ | 40 | /*====================================================================*/ |
| 41 | 41 | ||
| 42 | /* | ||
| 43 | The event() function is this driver's Card Services event handler. | ||
| 44 | It will be called by Card Services when an appropriate card status | ||
| 45 | event is received. The config() and release() entry points are | ||
| 46 | used to configure or release a socket, in response to card insertion | ||
| 47 | and ejection events. They are invoked from the skeleton event | ||
| 48 | handler. | ||
| 49 | */ | ||
| 50 | |||
| 51 | static int avma1cs_config(struct pcmcia_device *link) __devinit ; | 42 | static int avma1cs_config(struct pcmcia_device *link) __devinit ; |
| 52 | static void avma1cs_release(struct pcmcia_device *link); | 43 | static void avma1cs_release(struct pcmcia_device *link); |
| 53 | |||
| 54 | /* | ||
| 55 | The attach() and detach() entry points are used to create and destroy | ||
| 56 | "instances" of the driver, where each instance represents everything | ||
| 57 | needed to manage one actual PCMCIA card. | ||
| 58 | */ | ||
| 59 | |||
| 60 | static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit ; | 44 | static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit ; |
| 61 | 45 | ||
| 62 | |||
| 63 | /*====================================================================== | ||
| 64 | |||
| 65 | avma1cs_attach() creates an "instance" of the driver, allocating | ||
| 66 | local data structures for one device. The device is registered | ||
| 67 | with Card Services. | ||
| 68 | |||
| 69 | The dev_link structure is initialized, but we don't actually | ||
| 70 | configure the card at this point -- we wait until we receive a | ||
| 71 | card insertion event. | ||
| 72 | |||
| 73 | ======================================================================*/ | ||
| 74 | |||
| 75 | static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) | 46 | static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) |
| 76 | { | 47 | { |
| 77 | dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); | 48 | dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); |
| @@ -84,15 +55,6 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) | |||
| 84 | return avma1cs_config(p_dev); | 55 | return avma1cs_config(p_dev); |
| 85 | } /* avma1cs_attach */ | 56 | } /* avma1cs_attach */ |
| 86 | 57 | ||
| 87 | /*====================================================================== | ||
| 88 | |||
| 89 | This deletes a driver "instance". The device is de-registered | ||
| 90 | with Card Services. If it has been released, all local data | ||
| 91 | structures are freed. Otherwise, the structures will be freed | ||
| 92 | when the device is released. | ||
| 93 | |||
| 94 | ======================================================================*/ | ||
| 95 | |||
| 96 | static void __devexit avma1cs_detach(struct pcmcia_device *link) | 58 | static void __devexit avma1cs_detach(struct pcmcia_device *link) |
| 97 | { | 59 | { |
| 98 | dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); | 60 | dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); |
| @@ -100,14 +62,6 @@ static void __devexit avma1cs_detach(struct pcmcia_device *link) | |||
| 100 | kfree(link->priv); | 62 | kfree(link->priv); |
| 101 | } /* avma1cs_detach */ | 63 | } /* avma1cs_detach */ |
| 102 | 64 | ||
| 103 | /*====================================================================== | ||
| 104 | |||
| 105 | avma1cs_config() is scheduled to run after a CARD_INSERTION event | ||
| 106 | is received, to configure the PCMCIA socket, and to make the | ||
| 107 | ethernet device available to the system. | ||
| 108 | |||
| 109 | ======================================================================*/ | ||
| 110 | |||
| 111 | static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | 65 | static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) |
| 112 | { | 66 | { |
| 113 | p_dev->resource[0]->end = 16; | 67 | p_dev->resource[0]->end = 16; |
| @@ -180,14 +134,6 @@ static int __devinit avma1cs_config(struct pcmcia_device *link) | |||
| 180 | return 0; | 134 | return 0; |
| 181 | } /* avma1cs_config */ | 135 | } /* avma1cs_config */ |
| 182 | 136 | ||
| 183 | /*====================================================================== | ||
| 184 | |||
| 185 | After a card is removed, avma1cs_release() will unregister the net | ||
| 186 | device, and release the PCMCIA configuration. If the device is | ||
| 187 | still open, this will be postponed until it is closed. | ||
| 188 | |||
| 189 | ======================================================================*/ | ||
| 190 | |||
| 191 | static void avma1cs_release(struct pcmcia_device *link) | 137 | static void avma1cs_release(struct pcmcia_device *link) |
| 192 | { | 138 | { |
| 193 | unsigned long minor = (unsigned long) link->priv; | 139 | unsigned long minor = (unsigned long) link->priv; |
| @@ -200,7 +146,6 @@ static void avma1cs_release(struct pcmcia_device *link) | |||
| 200 | pcmcia_disable_device(link); | 146 | pcmcia_disable_device(link); |
| 201 | } /* avma1cs_release */ | 147 | } /* avma1cs_release */ |
| 202 | 148 | ||
| 203 | |||
| 204 | static struct pcmcia_device_id avma1cs_ids[] = { | 149 | static struct pcmcia_device_id avma1cs_ids[] = { |
| 205 | PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb), | 150 | PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb), |
| 206 | PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b), | 151 | PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b), |
| @@ -216,8 +161,6 @@ static struct pcmcia_driver avma1cs_driver = { | |||
| 216 | .id_table = avma1cs_ids, | 161 | .id_table = avma1cs_ids, |
| 217 | }; | 162 | }; |
| 218 | 163 | ||
| 219 | /*====================================================================*/ | ||
| 220 | |||
| 221 | static int __init init_avma1_cs(void) | 164 | static int __init init_avma1_cs(void) |
| 222 | { | 165 | { |
| 223 | return pcmcia_register_driver(&avma1cs_driver); | 166 | return pcmcia_register_driver(&avma1cs_driver); |
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index 2d439a79fd88..496d477af0f8 100644 --- a/drivers/isdn/hisax/elsa_cs.c +++ b/drivers/isdn/hisax/elsa_cs.c | |||
| @@ -63,26 +63,8 @@ MODULE_LICENSE("Dual MPL/GPL"); | |||
| 63 | static int protocol = 2; /* EURO-ISDN Default */ | 63 | static int protocol = 2; /* EURO-ISDN Default */ |
| 64 | module_param(protocol, int, 0); | 64 | module_param(protocol, int, 0); |
| 65 | 65 | ||
| 66 | /*====================================================================*/ | ||
| 67 | |||
| 68 | /* | ||
| 69 | The event() function is this driver's Card Services event handler. | ||
| 70 | It will be called by Card Services when an appropriate card status | ||
| 71 | event is received. The config() and release() entry points are | ||
| 72 | used to configure or release a socket, in response to card insertion | ||
| 73 | and ejection events. They are invoked from the elsa_cs event | ||
| 74 | handler. | ||
| 75 | */ | ||
| 76 | |||
| 77 | static int elsa_cs_config(struct pcmcia_device *link) __devinit ; | 66 | static int elsa_cs_config(struct pcmcia_device *link) __devinit ; |
| 78 | static void elsa_cs_release(struct pcmcia_device *link); | 67 | static void elsa_cs_release(struct pcmcia_device *link); |
| 79 | |||
| 80 | /* | ||
| 81 | The attach() and detach() entry points are used to create and destroy | ||
| 82 | "instances" of the driver, where each instance represents everything | ||
| 83 | needed to manage one actual PCMCIA card. | ||
| 84 | */ | ||
| 85 | |||
| 86 | static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit; | 68 | static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit; |
| 87 | 69 | ||
| 88 | typedef struct local_info_t { | 70 | typedef struct local_info_t { |
| @@ -91,18 +73,6 @@ typedef struct local_info_t { | |||
| 91 | int cardnr; | 73 | int cardnr; |
| 92 | } local_info_t; | 74 | } local_info_t; |
| 93 | 75 | ||
| 94 | /*====================================================================== | ||
| 95 | |||
| 96 | elsa_cs_attach() creates an "instance" of the driver, allocatingx | ||
| 97 | local data structures for one device. The device is registered | ||
| 98 | with Card Services. | ||
| 99 | |||
| 100 | The dev_link structure is initialized, but we don't actually | ||
| 101 | configure the card at this point -- we wait until we receive a | ||
| 102 | card insertion event. | ||
| 103 | |||
| 104 | ======================================================================*/ | ||
| 105 | |||
| 106 | static int __devinit elsa_cs_probe(struct pcmcia_device *link) | 76 | static int __devinit elsa_cs_probe(struct pcmcia_device *link) |
| 107 | { | 77 | { |
| 108 | local_info_t *local; | 78 | local_info_t *local; |
| @@ -121,15 +91,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link) | |||
| 121 | return elsa_cs_config(link); | 91 | return elsa_cs_config(link); |
| 122 | } /* elsa_cs_attach */ | 92 | } /* elsa_cs_attach */ |
| 123 | 93 | ||
| 124 | /*====================================================================== | ||
| 125 | |||
| 126 | This deletes a driver "instance". The device is de-registered | ||
| 127 | with Card Services. If it has been released, all local data | ||
| 128 | structures are freed. Otherwise, the structures will be freed | ||
| 129 | when the device is released. | ||
| 130 | |||
| 131 | ======================================================================*/ | ||
| 132 | |||
| 133 | static void __devexit elsa_cs_detach(struct pcmcia_device *link) | 94 | static void __devexit elsa_cs_detach(struct pcmcia_device *link) |
| 134 | { | 95 | { |
| 135 | local_info_t *info = link->priv; | 96 | local_info_t *info = link->priv; |
| @@ -142,14 +103,6 @@ static void __devexit elsa_cs_detach(struct pcmcia_device *link) | |||
| 142 | kfree(info); | 103 | kfree(info); |
| 143 | } /* elsa_cs_detach */ | 104 | } /* elsa_cs_detach */ |
| 144 | 105 | ||
| 145 | /*====================================================================== | ||
| 146 | |||
| 147 | elsa_cs_config() is scheduled to run after a CARD_INSERTION event | ||
| 148 | is received, to configure the PCMCIA socket, and to make the | ||
| 149 | device available to the system. | ||
| 150 | |||
| 151 | ======================================================================*/ | ||
| 152 | |||
| 153 | static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | 106 | static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) |
| 154 | { | 107 | { |
| 155 | int j; | 108 | int j; |
| @@ -215,14 +168,6 @@ failed: | |||
| 215 | return -ENODEV; | 168 | return -ENODEV; |
| 216 | } /* elsa_cs_config */ | 169 | } /* elsa_cs_config */ |
| 217 | 170 | ||
| 218 | /*====================================================================== | ||
| 219 | |||
| 220 | After a card is removed, elsa_cs_release() will unregister the net | ||
| 221 | device, and release the PCMCIA configuration. If the device is | ||
| 222 | still open, this will be postponed until it is closed. | ||
| 223 | |||
| 224 | ======================================================================*/ | ||
| 225 | |||
| 226 | static void elsa_cs_release(struct pcmcia_device *link) | 171 | static void elsa_cs_release(struct pcmcia_device *link) |
| 227 | { | 172 | { |
| 228 | local_info_t *local = link->priv; | 173 | local_info_t *local = link->priv; |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index 9e5c4fd08671..360204bc2777 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
| @@ -63,26 +63,9 @@ MODULE_LICENSE("Dual MPL/GPL"); | |||
| 63 | static int protocol = 2; /* EURO-ISDN Default */ | 63 | static int protocol = 2; /* EURO-ISDN Default */ |
| 64 | module_param(protocol, int, 0); | 64 | module_param(protocol, int, 0); |
| 65 | 65 | ||
| 66 | /*====================================================================*/ | ||
| 67 | |||
| 68 | /* | ||
| 69 | The event() function is this driver's Card Services event handler. | ||
| 70 | It will be called by Card Services when an appropriate card status | ||
| 71 | event is received. The config() and release() entry points are | ||
| 72 | used to configure or release a socket, in response to card | ||
| 73 | insertion and ejection events. They are invoked from the sedlbauer | ||
| 74 | event handler. | ||
| 75 | */ | ||
| 76 | |||
| 77 | static int sedlbauer_config(struct pcmcia_device *link) __devinit ; | 66 | static int sedlbauer_config(struct pcmcia_device *link) __devinit ; |
| 78 | static void sedlbauer_release(struct pcmcia_device *link); | 67 | static void sedlbauer_release(struct pcmcia_device *link); |
| 79 | 68 | ||
| 80 | /* | ||
| 81 | The attach() and detach() entry points are used to create and destroy | ||
| 82 | "instances" of the driver, where each instance represents everything | ||
| 83 | needed to manage one actual PCMCIA card. | ||
| 84 | */ | ||
| 85 | |||
| 86 | static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit; | 69 | static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit; |
| 87 | 70 | ||
| 88 | typedef struct local_info_t { | 71 | typedef struct local_info_t { |
| @@ -91,18 +74,6 @@ typedef struct local_info_t { | |||
| 91 | int cardnr; | 74 | int cardnr; |
| 92 | } local_info_t; | 75 | } local_info_t; |
| 93 | 76 | ||
| 94 | /*====================================================================== | ||
| 95 | |||
| 96 | sedlbauer_attach() creates an "instance" of the driver, allocating | ||
| 97 | local data structures for one device. The device is registered | ||
| 98 | with Card Services. | ||
| 99 | |||
| 100 | The dev_link structure is initialized, but we don't actually | ||
| 101 | configure the card at this point -- we wait until we receive a | ||
| 102 | card insertion event. | ||
| 103 | |||
| 104 | ======================================================================*/ | ||
| 105 | |||
| 106 | static int __devinit sedlbauer_probe(struct pcmcia_device *link) | 77 | static int __devinit sedlbauer_probe(struct pcmcia_device *link) |
| 107 | { | 78 | { |
| 108 | local_info_t *local; | 79 | local_info_t *local; |
| @@ -117,30 +88,9 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link) | |||
| 117 | local->p_dev = link; | 88 | local->p_dev = link; |
| 118 | link->priv = local; | 89 | link->priv = local; |
| 119 | 90 | ||
| 120 | /* | ||
| 121 | General socket configuration defaults can go here. In this | ||
| 122 | client, we assume very little, and rely on the CIS for almost | ||
| 123 | everything. In most clients, many details (i.e., number, sizes, | ||
| 124 | and attributes of IO windows) are fixed by the nature of the | ||
| 125 | device, and can be hard-wired here. | ||
| 126 | */ | ||
| 127 | |||
| 128 | /* from old sedl_cs | ||
| 129 | */ | ||
| 130 | /* The io structure describes IO port mapping */ | ||
| 131 | |||
| 132 | return sedlbauer_config(link); | 91 | return sedlbauer_config(link); |
| 133 | } /* sedlbauer_attach */ | 92 | } /* sedlbauer_attach */ |
| 134 | 93 | ||
| 135 | /*====================================================================== | ||
| 136 | |||
| 137 | This deletes a driver "instance". The device is de-registered | ||
| 138 | with Card Services. If it has been released, all local data | ||
| 139 | structures are freed. Otherwise, the structures will be freed | ||
| 140 | when the device is released. | ||
| 141 | |||
| 142 | ======================================================================*/ | ||
| 143 | |||
| 144 | static void __devexit sedlbauer_detach(struct pcmcia_device *link) | 94 | static void __devexit sedlbauer_detach(struct pcmcia_device *link) |
| 145 | { | 95 | { |
| 146 | dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); | 96 | dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); |
| @@ -152,13 +102,6 @@ static void __devexit sedlbauer_detach(struct pcmcia_device *link) | |||
| 152 | kfree(link->priv); | 102 | kfree(link->priv); |
| 153 | } /* sedlbauer_detach */ | 103 | } /* sedlbauer_detach */ |
| 154 | 104 | ||
| 155 | /*====================================================================== | ||
| 156 | |||
| 157 | sedlbauer_config() is scheduled to run after a CARD_INSERTION event | ||
| 158 | is received, to configure the PCMCIA socket, and to make the | ||
| 159 | device available to the system. | ||
| 160 | |||
| 161 | ======================================================================*/ | ||
| 162 | static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data) | 105 | static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data) |
| 163 | { | 106 | { |
| 164 | if (p_dev->config_index == 0) | 107 | if (p_dev->config_index == 0) |
| @@ -168,8 +111,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data) | |||
| 168 | return pcmcia_request_io(p_dev); | 111 | return pcmcia_request_io(p_dev); |
| 169 | } | 112 | } |
| 170 | 113 | ||
| 171 | |||
| 172 | |||
| 173 | static int __devinit sedlbauer_config(struct pcmcia_device *link) | 114 | static int __devinit sedlbauer_config(struct pcmcia_device *link) |
| 174 | { | 115 | { |
| 175 | int ret; | 116 | int ret; |
| @@ -180,27 +121,10 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) | |||
| 180 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_CHECK_VCC | | 121 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_CHECK_VCC | |
| 181 | CONF_AUTO_SET_VPP | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; | 122 | CONF_AUTO_SET_VPP | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; |
| 182 | 123 | ||
| 183 | /* | ||
| 184 | In this loop, we scan the CIS for configuration table entries, | ||
| 185 | each of which describes a valid card configuration, including | ||
| 186 | voltage, IO window, memory window, and interrupt settings. | ||
| 187 | |||
| 188 | We make no assumptions about the card to be configured: we use | ||
| 189 | just the information available in the CIS. In an ideal world, | ||
| 190 | this would work for any PCMCIA card, but it requires a complete | ||
| 191 | and accurate CIS. In practice, a driver usually "knows" most of | ||
| 192 | these things without consulting the CIS, and most client drivers | ||
| 193 | will only use the CIS to fill in implementation-defined details. | ||
| 194 | */ | ||
| 195 | ret = pcmcia_loop_config(link, sedlbauer_config_check, NULL); | 124 | ret = pcmcia_loop_config(link, sedlbauer_config_check, NULL); |
| 196 | if (ret) | 125 | if (ret) |
| 197 | goto failed; | 126 | goto failed; |
| 198 | 127 | ||
| 199 | /* | ||
| 200 | This actually configures the PCMCIA socket -- setting up | ||
| 201 | the I/O windows and the interrupt mapping, and putting the | ||
| 202 | card and host interface into "Memory and IO" mode. | ||
| 203 | */ | ||
| 204 | ret = pcmcia_enable_device(link); | 128 | ret = pcmcia_enable_device(link); |
| 205 | if (ret) | 129 | if (ret) |
| 206 | goto failed; | 130 | goto failed; |
| @@ -228,14 +152,6 @@ failed: | |||
| 228 | 152 | ||
| 229 | } /* sedlbauer_config */ | 153 | } /* sedlbauer_config */ |
| 230 | 154 | ||
| 231 | /*====================================================================== | ||
| 232 | |||
| 233 | After a card is removed, sedlbauer_release() will unregister the | ||
| 234 | device, and release the PCMCIA configuration. If the device is | ||
| 235 | still open, this will be postponed until it is closed. | ||
| 236 | |||
| 237 | ======================================================================*/ | ||
| 238 | |||
| 239 | static void sedlbauer_release(struct pcmcia_device *link) | 155 | static void sedlbauer_release(struct pcmcia_device *link) |
| 240 | { | 156 | { |
| 241 | local_info_t *local = link->priv; | 157 | local_info_t *local = link->priv; |
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index 82f09b864846..282a4467ef19 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
| @@ -44,26 +44,8 @@ MODULE_LICENSE("GPL"); | |||
| 44 | static int protocol = 2; /* EURO-ISDN Default */ | 44 | static int protocol = 2; /* EURO-ISDN Default */ |
| 45 | module_param(protocol, int, 0); | 45 | module_param(protocol, int, 0); |
| 46 | 46 | ||
| 47 | /*====================================================================*/ | ||
| 48 | |||
| 49 | /* | ||
| 50 | The event() function is this driver's Card Services event handler. | ||
| 51 | It will be called by Card Services when an appropriate card status | ||
| 52 | event is received. The config() and release() entry points are | ||
| 53 | used to configure or release a socket, in response to card insertion | ||
| 54 | and ejection events. They are invoked from the teles_cs event | ||
| 55 | handler. | ||
| 56 | */ | ||
| 57 | |||
| 58 | static int teles_cs_config(struct pcmcia_device *link) __devinit ; | 47 | static int teles_cs_config(struct pcmcia_device *link) __devinit ; |
| 59 | static void teles_cs_release(struct pcmcia_device *link); | 48 | static void teles_cs_release(struct pcmcia_device *link); |
| 60 | |||
| 61 | /* | ||
| 62 | The attach() and detach() entry points are used to create and destroy | ||
| 63 | "instances" of the driver, where each instance represents everything | ||
| 64 | needed to manage one actual PCMCIA card. | ||
| 65 | */ | ||
| 66 | |||
| 67 | static void teles_detach(struct pcmcia_device *p_dev) __devexit ; | 49 | static void teles_detach(struct pcmcia_device *p_dev) __devexit ; |
| 68 | 50 | ||
| 69 | typedef struct local_info_t { | 51 | typedef struct local_info_t { |
| @@ -72,18 +54,6 @@ typedef struct local_info_t { | |||
| 72 | int cardnr; | 54 | int cardnr; |
| 73 | } local_info_t; | 55 | } local_info_t; |
| 74 | 56 | ||
| 75 | /*====================================================================== | ||
| 76 | |||
| 77 | teles_attach() creates an "instance" of the driver, allocatingx | ||
| 78 | local data structures for one device. The device is registered | ||
| 79 | with Card Services. | ||
| 80 | |||
| 81 | The dev_link structure is initialized, but we don't actually | ||
| 82 | configure the card at this point -- we wait until we receive a | ||
| 83 | card insertion event. | ||
| 84 | |||
| 85 | ======================================================================*/ | ||
| 86 | |||
| 87 | static int __devinit teles_probe(struct pcmcia_device *link) | 57 | static int __devinit teles_probe(struct pcmcia_device *link) |
| 88 | { | 58 | { |
| 89 | local_info_t *local; | 59 | local_info_t *local; |
| @@ -98,27 +68,11 @@ static int __devinit teles_probe(struct pcmcia_device *link) | |||
| 98 | local->p_dev = link; | 68 | local->p_dev = link; |
| 99 | link->priv = local; | 69 | link->priv = local; |
| 100 | 70 | ||
| 101 | /* | ||
| 102 | General socket configuration defaults can go here. In this | ||
| 103 | client, we assume very little, and rely on the CIS for almost | ||
| 104 | everything. In most clients, many details (i.e., number, sizes, | ||
| 105 | and attributes of IO windows) are fixed by the nature of the | ||
| 106 | device, and can be hard-wired here. | ||
| 107 | */ | ||
| 108 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; | 71 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; |
| 109 | 72 | ||
| 110 | return teles_cs_config(link); | 73 | return teles_cs_config(link); |
| 111 | } /* teles_attach */ | 74 | } /* teles_attach */ |
| 112 | 75 | ||
| 113 | /*====================================================================== | ||
| 114 | |||
| 115 | This deletes a driver "instance". The device is de-registered | ||
| 116 | with Card Services. If it has been released, all local data | ||
| 117 | structures are freed. Otherwise, the structures will be freed | ||
| 118 | when the device is released. | ||
| 119 | |||
| 120 | ======================================================================*/ | ||
| 121 | |||
| 122 | static void __devexit teles_detach(struct pcmcia_device *link) | 76 | static void __devexit teles_detach(struct pcmcia_device *link) |
| 123 | { | 77 | { |
| 124 | local_info_t *info = link->priv; | 78 | local_info_t *info = link->priv; |
| @@ -131,14 +85,6 @@ static void __devexit teles_detach(struct pcmcia_device *link) | |||
| 131 | kfree(info); | 85 | kfree(info); |
| 132 | } /* teles_detach */ | 86 | } /* teles_detach */ |
| 133 | 87 | ||
| 134 | /*====================================================================== | ||
| 135 | |||
| 136 | teles_cs_config() is scheduled to run after a CARD_INSERTION event | ||
| 137 | is received, to configure the PCMCIA socket, and to make the | ||
| 138 | device available to the system. | ||
| 139 | |||
| 140 | ======================================================================*/ | ||
| 141 | |||
| 142 | static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | 88 | static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) |
| 143 | { | 89 | { |
| 144 | int j; | 90 | int j; |
| @@ -204,14 +150,6 @@ cs_failed: | |||
| 204 | return -ENODEV; | 150 | return -ENODEV; |
| 205 | } /* teles_cs_config */ | 151 | } /* teles_cs_config */ |
| 206 | 152 | ||
| 207 | /*====================================================================== | ||
| 208 | |||
| 209 | After a card is removed, teles_cs_release() will unregister the net | ||
| 210 | device, and release the PCMCIA configuration. If the device is | ||
| 211 | still open, this will be postponed until it is closed. | ||
| 212 | |||
| 213 | ======================================================================*/ | ||
| 214 | |||
| 215 | static void teles_cs_release(struct pcmcia_device *link) | 153 | static void teles_cs_release(struct pcmcia_device *link) |
| 216 | { | 154 | { |
| 217 | local_info_t *local = link->priv; | 155 | local_info_t *local = link->priv; |
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 5df89e742a33..57a1acfe22c4 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
| @@ -321,11 +321,6 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on) | |||
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | 323 | ||
| 324 | /* After a card is removed, pcmciamtd_release() will unregister the | ||
| 325 | * device, and release the PCMCIA configuration. If the device is | ||
| 326 | * still open, this will be postponed until it is closed. | ||
| 327 | */ | ||
| 328 | |||
| 329 | static void pcmciamtd_release(struct pcmcia_device *link) | 324 | static void pcmciamtd_release(struct pcmcia_device *link) |
| 330 | { | 325 | { |
| 331 | struct pcmciamtd_dev *dev = link->priv; | 326 | struct pcmciamtd_dev *dev = link->priv; |
| @@ -475,11 +470,6 @@ static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *p_dev | |||
| 475 | } | 470 | } |
| 476 | 471 | ||
| 477 | 472 | ||
| 478 | /* pcmciamtd_config() is scheduled to run after a CARD_INSERTION event | ||
| 479 | * is received, to configure the PCMCIA socket, and to make the | ||
| 480 | * MTD device available to the system. | ||
| 481 | */ | ||
| 482 | |||
| 483 | static int pcmciamtd_config(struct pcmcia_device *link) | 473 | static int pcmciamtd_config(struct pcmcia_device *link) |
| 484 | { | 474 | { |
| 485 | struct pcmciamtd_dev *dev = link->priv; | 475 | struct pcmciamtd_dev *dev = link->priv; |
| @@ -676,12 +666,6 @@ static int pcmciamtd_resume(struct pcmcia_device *dev) | |||
| 676 | } | 666 | } |
| 677 | 667 | ||
| 678 | 668 | ||
| 679 | /* This deletes a driver "instance". The device is de-registered | ||
| 680 | * with Card Services. If it has been released, all local data | ||
| 681 | * structures are freed. Otherwise, the structures will be freed | ||
| 682 | * when the device is released. | ||
| 683 | */ | ||
| 684 | |||
| 685 | static void pcmciamtd_detach(struct pcmcia_device *link) | 669 | static void pcmciamtd_detach(struct pcmcia_device *link) |
| 686 | { | 670 | { |
| 687 | struct pcmciamtd_dev *dev = link->priv; | 671 | struct pcmciamtd_dev *dev = link->priv; |
| @@ -699,11 +683,6 @@ static void pcmciamtd_detach(struct pcmcia_device *link) | |||
| 699 | } | 683 | } |
| 700 | 684 | ||
| 701 | 685 | ||
| 702 | /* pcmciamtd_attach() creates an "instance" of the driver, allocating | ||
| 703 | * local data structures for one device. The device is registered | ||
| 704 | * with Card Services. | ||
| 705 | */ | ||
| 706 | |||
| 707 | static int pcmciamtd_probe(struct pcmcia_device *link) | 686 | static int pcmciamtd_probe(struct pcmcia_device *link) |
| 708 | { | 687 | { |
| 709 | struct pcmciamtd_dev *dev; | 688 | struct pcmciamtd_dev *dev; |
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index ba52b0b6d93b..ff824e11f0b6 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
| @@ -287,16 +287,7 @@ static int tc574_probe(struct pcmcia_device *link) | |||
| 287 | dev->watchdog_timeo = TX_TIMEOUT; | 287 | dev->watchdog_timeo = TX_TIMEOUT; |
| 288 | 288 | ||
| 289 | return tc574_config(link); | 289 | return tc574_config(link); |
| 290 | } /* tc574_attach */ | 290 | } |
| 291 | |||
| 292 | /* | ||
| 293 | |||
| 294 | This deletes a driver "instance". The device is de-registered | ||
| 295 | with Card Services. If it has been released, all local data | ||
| 296 | structures are freed. Otherwise, the structures will be freed | ||
| 297 | when the device is released. | ||
| 298 | |||
| 299 | */ | ||
| 300 | 291 | ||
| 301 | static void tc574_detach(struct pcmcia_device *link) | 292 | static void tc574_detach(struct pcmcia_device *link) |
| 302 | { | 293 | { |
| @@ -311,12 +302,6 @@ static void tc574_detach(struct pcmcia_device *link) | |||
| 311 | free_netdev(dev); | 302 | free_netdev(dev); |
| 312 | } /* tc574_detach */ | 303 | } /* tc574_detach */ |
| 313 | 304 | ||
| 314 | /* | ||
| 315 | tc574_config() is scheduled to run after a CARD_INSERTION event | ||
| 316 | is received, to configure the PCMCIA socket, and to make the | ||
| 317 | ethernet device available to the system. | ||
| 318 | */ | ||
| 319 | |||
| 320 | static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; | 305 | static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; |
| 321 | 306 | ||
| 322 | static int tc574_config(struct pcmcia_device *link) | 307 | static int tc574_config(struct pcmcia_device *link) |
| @@ -463,12 +448,6 @@ failed: | |||
| 463 | 448 | ||
| 464 | } /* tc574_config */ | 449 | } /* tc574_config */ |
| 465 | 450 | ||
| 466 | /* | ||
| 467 | After a card is removed, tc574_release() will unregister the net | ||
| 468 | device, and release the PCMCIA configuration. If the device is | ||
| 469 | still open, this will be postponed until it is closed. | ||
| 470 | */ | ||
| 471 | |||
| 472 | static void tc574_release(struct pcmcia_device *link) | 451 | static void tc574_release(struct pcmcia_device *link) |
| 473 | { | 452 | { |
| 474 | pcmcia_disable_device(link); | 453 | pcmcia_disable_device(link); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 551759c25a74..a07e22295330 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
| @@ -175,14 +175,6 @@ static const struct ethtool_ops netdev_ethtool_ops; | |||
| 175 | 175 | ||
| 176 | static void tc589_detach(struct pcmcia_device *p_dev); | 176 | static void tc589_detach(struct pcmcia_device *p_dev); |
| 177 | 177 | ||
| 178 | /*====================================================================== | ||
| 179 | |||
| 180 | tc589_attach() creates an "instance" of the driver, allocating | ||
| 181 | local data structures for one device. The device is registered | ||
| 182 | with Card Services. | ||
| 183 | |||
| 184 | ======================================================================*/ | ||
| 185 | |||
| 186 | static const struct net_device_ops el3_netdev_ops = { | 178 | static const struct net_device_ops el3_netdev_ops = { |
| 187 | .ndo_open = el3_open, | 179 | .ndo_open = el3_open, |
| 188 | .ndo_stop = el3_close, | 180 | .ndo_stop = el3_close, |
| @@ -224,16 +216,7 @@ static int tc589_probe(struct pcmcia_device *link) | |||
| 224 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | 216 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); |
| 225 | 217 | ||
| 226 | return tc589_config(link); | 218 | return tc589_config(link); |
| 227 | } /* tc589_attach */ | 219 | } |
| 228 | |||
| 229 | /*====================================================================== | ||
| 230 | |||
| 231 | This deletes a driver "instance". The device is de-registered | ||
| 232 | with Card Services. If it has been released, all local data | ||
| 233 | structures are freed. Otherwise, the structures will be freed | ||
| 234 | when the device is released. | ||
| 235 | |||
| 236 | ======================================================================*/ | ||
| 237 | 220 | ||
| 238 | static void tc589_detach(struct pcmcia_device *link) | 221 | static void tc589_detach(struct pcmcia_device *link) |
| 239 | { | 222 | { |
| @@ -248,14 +231,6 @@ static void tc589_detach(struct pcmcia_device *link) | |||
| 248 | free_netdev(dev); | 231 | free_netdev(dev); |
| 249 | } /* tc589_detach */ | 232 | } /* tc589_detach */ |
| 250 | 233 | ||
| 251 | /*====================================================================== | ||
| 252 | |||
| 253 | tc589_config() is scheduled to run after a CARD_INSERTION event | ||
| 254 | is received, to configure the PCMCIA socket, and to make the | ||
| 255 | ethernet device available to the system. | ||
| 256 | |||
| 257 | ======================================================================*/ | ||
| 258 | |||
| 259 | static int tc589_config(struct pcmcia_device *link) | 234 | static int tc589_config(struct pcmcia_device *link) |
| 260 | { | 235 | { |
| 261 | struct net_device *dev = link->priv; | 236 | struct net_device *dev = link->priv; |
| @@ -350,14 +325,6 @@ failed: | |||
| 350 | return -ENODEV; | 325 | return -ENODEV; |
| 351 | } /* tc589_config */ | 326 | } /* tc589_config */ |
| 352 | 327 | ||
| 353 | /*====================================================================== | ||
| 354 | |||
| 355 | After a card is removed, tc589_release() will unregister the net | ||
| 356 | device, and release the PCMCIA configuration. If the device is | ||
| 357 | still open, this will be postponed until it is closed. | ||
| 358 | |||
| 359 | ======================================================================*/ | ||
| 360 | |||
| 361 | static void tc589_release(struct pcmcia_device *link) | 328 | static void tc589_release(struct pcmcia_device *link) |
| 362 | { | 329 | { |
| 363 | pcmcia_disable_device(link); | 330 | pcmcia_disable_device(link); |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index fb5a39ba4801..9e8b28b271ae 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
| @@ -139,14 +139,6 @@ static const struct net_device_ops axnet_netdev_ops = { | |||
| 139 | .ndo_validate_addr = eth_validate_addr, | 139 | .ndo_validate_addr = eth_validate_addr, |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | /*====================================================================== | ||
| 143 | |||
| 144 | axnet_attach() creates an "instance" of the driver, allocating | ||
| 145 | local data structures for one device. The device is registered | ||
| 146 | with Card Services. | ||
| 147 | |||
| 148 | ======================================================================*/ | ||
| 149 | |||
| 150 | static int axnet_probe(struct pcmcia_device *link) | 142 | static int axnet_probe(struct pcmcia_device *link) |
| 151 | { | 143 | { |
| 152 | axnet_dev_t *info; | 144 | axnet_dev_t *info; |
| @@ -175,15 +167,6 @@ static int axnet_probe(struct pcmcia_device *link) | |||
| 175 | return axnet_config(link); | 167 | return axnet_config(link); |
| 176 | } /* axnet_attach */ | 168 | } /* axnet_attach */ |
| 177 | 169 | ||
| 178 | /*====================================================================== | ||
| 179 | |||
| 180 | This deletes a driver "instance". The device is de-registered | ||
| 181 | with Card Services. If it has been released, all local data | ||
| 182 | structures are freed. Otherwise, the structures will be freed | ||
| 183 | when the device is released. | ||
| 184 | |||
| 185 | ======================================================================*/ | ||
| 186 | |||
| 187 | static void axnet_detach(struct pcmcia_device *link) | 170 | static void axnet_detach(struct pcmcia_device *link) |
| 188 | { | 171 | { |
| 189 | struct net_device *dev = link->priv; | 172 | struct net_device *dev = link->priv; |
| @@ -246,14 +229,6 @@ static int get_prom(struct pcmcia_device *link) | |||
| 246 | return 1; | 229 | return 1; |
| 247 | } /* get_prom */ | 230 | } /* get_prom */ |
| 248 | 231 | ||
| 249 | /*====================================================================== | ||
| 250 | |||
| 251 | axnet_config() is scheduled to run after a CARD_INSERTION event | ||
| 252 | is received, to configure the PCMCIA socket, and to make the | ||
| 253 | ethernet device available to the system. | ||
| 254 | |||
| 255 | ======================================================================*/ | ||
| 256 | |||
| 257 | static int try_io_port(struct pcmcia_device *link) | 232 | static int try_io_port(struct pcmcia_device *link) |
| 258 | { | 233 | { |
| 259 | int j, ret; | 234 | int j, ret; |
| @@ -392,14 +367,6 @@ failed: | |||
| 392 | return -ENODEV; | 367 | return -ENODEV; |
| 393 | } /* axnet_config */ | 368 | } /* axnet_config */ |
| 394 | 369 | ||
| 395 | /*====================================================================== | ||
| 396 | |||
| 397 | After a card is removed, axnet_release() will unregister the net | ||
| 398 | device, and release the PCMCIA configuration. If the device is | ||
| 399 | still open, this will be postponed until it is closed. | ||
| 400 | |||
| 401 | ======================================================================*/ | ||
| 402 | |||
| 403 | static void axnet_release(struct pcmcia_device *link) | 370 | static void axnet_release(struct pcmcia_device *link) |
| 404 | { | 371 | { |
| 405 | pcmcia_disable_device(link); | 372 | pcmcia_disable_device(link); |
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index a5d918ea5b13..b706a7249477 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
| @@ -122,14 +122,6 @@ typedef struct com20020_dev_t { | |||
| 122 | struct net_device *dev; | 122 | struct net_device *dev; |
| 123 | } com20020_dev_t; | 123 | } com20020_dev_t; |
| 124 | 124 | ||
| 125 | /*====================================================================== | ||
| 126 | |||
| 127 | com20020_attach() creates an "instance" of the driver, allocating | ||
| 128 | local data structures for one device. The device is registered | ||
| 129 | with Card Services. | ||
| 130 | |||
| 131 | ======================================================================*/ | ||
| 132 | |||
| 133 | static int com20020_probe(struct pcmcia_device *p_dev) | 125 | static int com20020_probe(struct pcmcia_device *p_dev) |
| 134 | { | 126 | { |
| 135 | com20020_dev_t *info; | 127 | com20020_dev_t *info; |
| @@ -172,15 +164,6 @@ fail_alloc_info: | |||
| 172 | return -ENOMEM; | 164 | return -ENOMEM; |
| 173 | } /* com20020_attach */ | 165 | } /* com20020_attach */ |
| 174 | 166 | ||
| 175 | /*====================================================================== | ||
| 176 | |||
| 177 | This deletes a driver "instance". The device is de-registered | ||
| 178 | with Card Services. If it has been released, all local data | ||
| 179 | structures are freed. Otherwise, the structures will be freed | ||
| 180 | when the device is released. | ||
| 181 | |||
| 182 | ======================================================================*/ | ||
| 183 | |||
| 184 | static void com20020_detach(struct pcmcia_device *link) | 167 | static void com20020_detach(struct pcmcia_device *link) |
| 185 | { | 168 | { |
| 186 | struct com20020_dev_t *info = link->priv; | 169 | struct com20020_dev_t *info = link->priv; |
| @@ -219,14 +202,6 @@ static void com20020_detach(struct pcmcia_device *link) | |||
| 219 | 202 | ||
| 220 | } /* com20020_detach */ | 203 | } /* com20020_detach */ |
| 221 | 204 | ||
| 222 | /*====================================================================== | ||
| 223 | |||
| 224 | com20020_config() is scheduled to run after a CARD_INSERTION event | ||
| 225 | is received, to configure the PCMCIA socket, and to make the | ||
| 226 | device available to the system. | ||
| 227 | |||
| 228 | ======================================================================*/ | ||
| 229 | |||
| 230 | static int com20020_config(struct pcmcia_device *link) | 205 | static int com20020_config(struct pcmcia_device *link) |
| 231 | { | 206 | { |
| 232 | struct arcnet_local *lp; | 207 | struct arcnet_local *lp; |
| @@ -314,14 +289,6 @@ failed: | |||
| 314 | return -ENODEV; | 289 | return -ENODEV; |
| 315 | } /* com20020_config */ | 290 | } /* com20020_config */ |
| 316 | 291 | ||
| 317 | /*====================================================================== | ||
| 318 | |||
| 319 | After a card is removed, com20020_release() will unregister the net | ||
| 320 | device, and release the PCMCIA configuration. If the device is | ||
| 321 | still open, this will be postponed until it is closed. | ||
| 322 | |||
| 323 | ======================================================================*/ | ||
| 324 | |||
| 325 | static void com20020_release(struct pcmcia_device *link) | 292 | static void com20020_release(struct pcmcia_device *link) |
| 326 | { | 293 | { |
| 327 | dev_dbg(&link->dev, "com20020_release\n"); | 294 | dev_dbg(&link->dev, "com20020_release\n"); |
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index d3c9f016f791..bf7dff96d881 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
| @@ -121,14 +121,6 @@ static irqreturn_t ibmtr_interrupt(int irq, void *dev_id) { | |||
| 121 | return tok_interrupt(irq, dev); | 121 | return tok_interrupt(irq, dev); |
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | /*====================================================================== | ||
| 125 | |||
| 126 | ibmtr_attach() creates an "instance" of the driver, allocating | ||
| 127 | local data structures for one device. The device is registered | ||
| 128 | with Card Services. | ||
| 129 | |||
| 130 | ======================================================================*/ | ||
| 131 | |||
| 132 | static int __devinit ibmtr_attach(struct pcmcia_device *link) | 124 | static int __devinit ibmtr_attach(struct pcmcia_device *link) |
| 133 | { | 125 | { |
| 134 | ibmtr_dev_t *info; | 126 | ibmtr_dev_t *info; |
| @@ -161,15 +153,6 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) | |||
| 161 | return ibmtr_config(link); | 153 | return ibmtr_config(link); |
| 162 | } /* ibmtr_attach */ | 154 | } /* ibmtr_attach */ |
| 163 | 155 | ||
| 164 | /*====================================================================== | ||
| 165 | |||
| 166 | This deletes a driver "instance". The device is de-registered | ||
| 167 | with Card Services. If it has been released, all local data | ||
| 168 | structures are freed. Otherwise, the structures will be freed | ||
| 169 | when the device is released. | ||
| 170 | |||
| 171 | ======================================================================*/ | ||
| 172 | |||
| 173 | static void ibmtr_detach(struct pcmcia_device *link) | 156 | static void ibmtr_detach(struct pcmcia_device *link) |
| 174 | { | 157 | { |
| 175 | struct ibmtr_dev_t *info = link->priv; | 158 | struct ibmtr_dev_t *info = link->priv; |
| @@ -194,14 +177,6 @@ static void ibmtr_detach(struct pcmcia_device *link) | |||
| 194 | kfree(info); | 177 | kfree(info); |
| 195 | } /* ibmtr_detach */ | 178 | } /* ibmtr_detach */ |
| 196 | 179 | ||
| 197 | /*====================================================================== | ||
| 198 | |||
| 199 | ibmtr_config() is scheduled to run after a CARD_INSERTION event | ||
| 200 | is received, to configure the PCMCIA socket, and to make the | ||
| 201 | token-ring device available to the system. | ||
| 202 | |||
| 203 | ======================================================================*/ | ||
| 204 | |||
| 205 | static int __devinit ibmtr_config(struct pcmcia_device *link) | 180 | static int __devinit ibmtr_config(struct pcmcia_device *link) |
| 206 | { | 181 | { |
| 207 | ibmtr_dev_t *info = link->priv; | 182 | ibmtr_dev_t *info = link->priv; |
| @@ -297,14 +272,6 @@ failed: | |||
| 297 | return -ENODEV; | 272 | return -ENODEV; |
| 298 | } /* ibmtr_config */ | 273 | } /* ibmtr_config */ |
| 299 | 274 | ||
| 300 | /*====================================================================== | ||
| 301 | |||
| 302 | After a card is removed, ibmtr_release() will unregister the net | ||
| 303 | device, and release the PCMCIA configuration. If the device is | ||
| 304 | still open, this will be postponed until it is closed. | ||
| 305 | |||
| 306 | ======================================================================*/ | ||
| 307 | |||
| 308 | static void ibmtr_release(struct pcmcia_device *link) | 275 | static void ibmtr_release(struct pcmcia_device *link) |
| 309 | { | 276 | { |
| 310 | ibmtr_dev_t *info = link->priv; | 277 | ibmtr_dev_t *info = link->priv; |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 8e5730c42ce6..1eca4f5a6e78 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
| @@ -434,13 +434,6 @@ static const struct net_device_ops mace_netdev_ops = { | |||
| 434 | .ndo_validate_addr = eth_validate_addr, | 434 | .ndo_validate_addr = eth_validate_addr, |
| 435 | }; | 435 | }; |
| 436 | 436 | ||
| 437 | /* ---------------------------------------------------------------------------- | ||
| 438 | nmclan_attach | ||
| 439 | Creates an "instance" of the driver, allocating local data | ||
| 440 | structures for one device. The device is registered with Card | ||
| 441 | Services. | ||
| 442 | ---------------------------------------------------------------------------- */ | ||
| 443 | |||
| 444 | static int nmclan_probe(struct pcmcia_device *link) | 437 | static int nmclan_probe(struct pcmcia_device *link) |
| 445 | { | 438 | { |
| 446 | mace_private *lp; | 439 | mace_private *lp; |
| @@ -472,14 +465,6 @@ static int nmclan_probe(struct pcmcia_device *link) | |||
| 472 | return nmclan_config(link); | 465 | return nmclan_config(link); |
| 473 | } /* nmclan_attach */ | 466 | } /* nmclan_attach */ |
| 474 | 467 | ||
| 475 | /* ---------------------------------------------------------------------------- | ||
| 476 | nmclan_detach | ||
| 477 | This deletes a driver "instance". The device is de-registered | ||
| 478 | with Card Services. If it has been released, all local data | ||
| 479 | structures are freed. Otherwise, the structures will be freed | ||
| 480 | when the device is released. | ||
| 481 | ---------------------------------------------------------------------------- */ | ||
| 482 | |||
| 483 | static void nmclan_detach(struct pcmcia_device *link) | 468 | static void nmclan_detach(struct pcmcia_device *link) |
| 484 | { | 469 | { |
| 485 | struct net_device *dev = link->priv; | 470 | struct net_device *dev = link->priv; |
| @@ -623,13 +608,6 @@ static int mace_init(mace_private *lp, unsigned int ioaddr, char *enet_addr) | |||
| 623 | return 0; | 608 | return 0; |
| 624 | } /* mace_init */ | 609 | } /* mace_init */ |
| 625 | 610 | ||
| 626 | /* ---------------------------------------------------------------------------- | ||
| 627 | nmclan_config | ||
| 628 | This routine is scheduled to run after a CARD_INSERTION event | ||
| 629 | is received, to configure the PCMCIA socket, and to make the | ||
| 630 | ethernet device available to the system. | ||
| 631 | ---------------------------------------------------------------------------- */ | ||
| 632 | |||
| 633 | static int nmclan_config(struct pcmcia_device *link) | 611 | static int nmclan_config(struct pcmcia_device *link) |
| 634 | { | 612 | { |
| 635 | struct net_device *dev = link->priv; | 613 | struct net_device *dev = link->priv; |
| @@ -710,12 +688,6 @@ failed: | |||
| 710 | return -ENODEV; | 688 | return -ENODEV; |
| 711 | } /* nmclan_config */ | 689 | } /* nmclan_config */ |
| 712 | 690 | ||
| 713 | /* ---------------------------------------------------------------------------- | ||
| 714 | nmclan_release | ||
| 715 | After a card is removed, nmclan_release() will unregister the | ||
| 716 | net device, and release the PCMCIA configuration. If the device | ||
| 717 | is still open, this will be postponed until it is closed. | ||
| 718 | ---------------------------------------------------------------------------- */ | ||
| 719 | static void nmclan_release(struct pcmcia_device *link) | 691 | static void nmclan_release(struct pcmcia_device *link) |
| 720 | { | 692 | { |
| 721 | dev_dbg(&link->dev, "nmclan_release\n"); | 693 | dev_dbg(&link->dev, "nmclan_release\n"); |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 22987e6a685e..5d7d1d3088ae 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
| @@ -237,14 +237,6 @@ static const struct net_device_ops pcnet_netdev_ops = { | |||
| 237 | #endif | 237 | #endif |
| 238 | }; | 238 | }; |
| 239 | 239 | ||
| 240 | /*====================================================================== | ||
| 241 | |||
| 242 | pcnet_attach() creates an "instance" of the driver, allocating | ||
| 243 | local data structures for one device. The device is registered | ||
| 244 | with Card Services. | ||
| 245 | |||
| 246 | ======================================================================*/ | ||
| 247 | |||
| 248 | static int pcnet_probe(struct pcmcia_device *link) | 240 | static int pcnet_probe(struct pcmcia_device *link) |
| 249 | { | 241 | { |
| 250 | pcnet_dev_t *info; | 242 | pcnet_dev_t *info; |
| @@ -266,15 +258,6 @@ static int pcnet_probe(struct pcmcia_device *link) | |||
| 266 | return pcnet_config(link); | 258 | return pcnet_config(link); |
| 267 | } /* pcnet_attach */ | 259 | } /* pcnet_attach */ |
| 268 | 260 | ||
| 269 | /*====================================================================== | ||
| 270 | |||
| 271 | This deletes a driver "instance". The device is de-registered | ||
| 272 | with Card Services. If it has been released, all local data | ||
| 273 | structures are freed. Otherwise, the structures will be freed | ||
| 274 | when the device is released. | ||
| 275 | |||
| 276 | ======================================================================*/ | ||
| 277 | |||
| 278 | static void pcnet_detach(struct pcmcia_device *link) | 261 | static void pcnet_detach(struct pcmcia_device *link) |
| 279 | { | 262 | { |
| 280 | struct net_device *dev = link->priv; | 263 | struct net_device *dev = link->priv; |
| @@ -461,14 +444,6 @@ static hw_info_t *get_hwired(struct pcmcia_device *link) | |||
| 461 | return &default_info; | 444 | return &default_info; |
| 462 | } /* get_hwired */ | 445 | } /* get_hwired */ |
| 463 | 446 | ||
| 464 | /*====================================================================== | ||
| 465 | |||
| 466 | pcnet_config() is scheduled to run after a CARD_INSERTION event | ||
| 467 | is received, to configure the PCMCIA socket, and to make the | ||
| 468 | ethernet device available to the system. | ||
| 469 | |||
| 470 | ======================================================================*/ | ||
| 471 | |||
| 472 | static int try_io_port(struct pcmcia_device *link) | 447 | static int try_io_port(struct pcmcia_device *link) |
| 473 | { | 448 | { |
| 474 | int j, ret; | 449 | int j, ret; |
| @@ -665,14 +640,6 @@ failed: | |||
| 665 | return -ENODEV; | 640 | return -ENODEV; |
| 666 | } /* pcnet_config */ | 641 | } /* pcnet_config */ |
| 667 | 642 | ||
| 668 | /*====================================================================== | ||
| 669 | |||
| 670 | After a card is removed, pcnet_release() will unregister the net | ||
| 671 | device, and release the PCMCIA configuration. If the device is | ||
| 672 | still open, this will be postponed until it is closed. | ||
| 673 | |||
| 674 | ======================================================================*/ | ||
| 675 | |||
| 676 | static void pcnet_release(struct pcmcia_device *link) | 643 | static void pcnet_release(struct pcmcia_device *link) |
| 677 | { | 644 | { |
| 678 | pcnet_dev_t *info = PRIV(link->priv); | 645 | pcnet_dev_t *info = PRIV(link->priv); |
| @@ -685,15 +652,6 @@ static void pcnet_release(struct pcmcia_device *link) | |||
| 685 | pcmcia_disable_device(link); | 652 | pcmcia_disable_device(link); |
| 686 | } | 653 | } |
| 687 | 654 | ||
| 688 | /*====================================================================== | ||
| 689 | |||
| 690 | The card status event handler. Mostly, this schedules other | ||
| 691 | stuff to run after an event is received. A CARD_REMOVAL event | ||
| 692 | also sets some flags to discourage the net drivers from trying | ||
| 693 | to talk to the card any more. | ||
| 694 | |||
| 695 | ======================================================================*/ | ||
| 696 | |||
| 697 | static int pcnet_suspend(struct pcmcia_device *link) | 655 | static int pcnet_suspend(struct pcmcia_device *link) |
| 698 | { | 656 | { |
| 699 | struct net_device *dev = link->priv; | 657 | struct net_device *dev = link->priv; |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index e4c4fb626572..0af2fc8ec164 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
| @@ -299,14 +299,6 @@ static const struct net_device_ops smc_netdev_ops = { | |||
| 299 | .ndo_validate_addr = eth_validate_addr, | 299 | .ndo_validate_addr = eth_validate_addr, |
| 300 | }; | 300 | }; |
| 301 | 301 | ||
| 302 | /*====================================================================== | ||
| 303 | |||
| 304 | smc91c92_attach() creates an "instance" of the driver, allocating | ||
| 305 | local data structures for one device. The device is registered | ||
| 306 | with Card Services. | ||
| 307 | |||
| 308 | ======================================================================*/ | ||
| 309 | |||
| 310 | static int smc91c92_probe(struct pcmcia_device *link) | 302 | static int smc91c92_probe(struct pcmcia_device *link) |
| 311 | { | 303 | { |
| 312 | struct smc_private *smc; | 304 | struct smc_private *smc; |
| @@ -338,15 +330,6 @@ static int smc91c92_probe(struct pcmcia_device *link) | |||
| 338 | return smc91c92_config(link); | 330 | return smc91c92_config(link); |
| 339 | } /* smc91c92_attach */ | 331 | } /* smc91c92_attach */ |
| 340 | 332 | ||
| 341 | /*====================================================================== | ||
| 342 | |||
| 343 | This deletes a driver "instance". The device is de-registered | ||
| 344 | with Card Services. If it has been released, all local data | ||
| 345 | structures are freed. Otherwise, the structures will be freed | ||
| 346 | when the device is released. | ||
| 347 | |||
| 348 | ======================================================================*/ | ||
| 349 | |||
| 350 | static void smc91c92_detach(struct pcmcia_device *link) | 333 | static void smc91c92_detach(struct pcmcia_device *link) |
| 351 | { | 334 | { |
| 352 | struct net_device *dev = link->priv; | 335 | struct net_device *dev = link->priv; |
| @@ -819,14 +802,6 @@ static int check_sig(struct pcmcia_device *link) | |||
| 819 | return -ENODEV; | 802 | return -ENODEV; |
| 820 | } | 803 | } |
| 821 | 804 | ||
| 822 | /*====================================================================== | ||
| 823 | |||
| 824 | smc91c92_config() is scheduled to run after a CARD_INSERTION event | ||
| 825 | is received, to configure the PCMCIA socket, and to make the | ||
| 826 | ethernet device available to the system. | ||
| 827 | |||
| 828 | ======================================================================*/ | ||
| 829 | |||
| 830 | static int smc91c92_config(struct pcmcia_device *link) | 805 | static int smc91c92_config(struct pcmcia_device *link) |
| 831 | { | 806 | { |
| 832 | struct net_device *dev = link->priv; | 807 | struct net_device *dev = link->priv; |
| @@ -977,14 +952,6 @@ config_failed: | |||
| 977 | return -ENODEV; | 952 | return -ENODEV; |
| 978 | } /* smc91c92_config */ | 953 | } /* smc91c92_config */ |
| 979 | 954 | ||
| 980 | /*====================================================================== | ||
| 981 | |||
| 982 | After a card is removed, smc91c92_release() will unregister the net | ||
| 983 | device, and release the PCMCIA configuration. If the device is | ||
| 984 | still open, this will be postponed until it is closed. | ||
| 985 | |||
| 986 | ======================================================================*/ | ||
| 987 | |||
| 988 | static void smc91c92_release(struct pcmcia_device *link) | 955 | static void smc91c92_release(struct pcmcia_device *link) |
| 989 | { | 956 | { |
| 990 | dev_dbg(&link->dev, "smc91c92_release\n"); | 957 | dev_dbg(&link->dev, "smc91c92_release\n"); |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 18cdc84a84bf..1fece617c069 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
| @@ -266,33 +266,11 @@ static unsigned mii_rd(unsigned int ioaddr, u_char phyaddr, u_char phyreg); | |||
| 266 | static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, | 266 | static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, |
| 267 | unsigned data, int len); | 267 | unsigned data, int len); |
| 268 | 268 | ||
| 269 | /* | ||
| 270 | * The event() function is this driver's Card Services event handler. | ||
| 271 | * It will be called by Card Services when an appropriate card status | ||
| 272 | * event is received. The config() and release() entry points are | ||
| 273 | * used to configure or release a socket, in response to card insertion | ||
| 274 | * and ejection events. They are invoked from the event handler. | ||
| 275 | */ | ||
| 276 | |||
| 277 | static int has_ce2_string(struct pcmcia_device * link); | 269 | static int has_ce2_string(struct pcmcia_device * link); |
| 278 | static int xirc2ps_config(struct pcmcia_device * link); | 270 | static int xirc2ps_config(struct pcmcia_device * link); |
| 279 | static void xirc2ps_release(struct pcmcia_device * link); | 271 | static void xirc2ps_release(struct pcmcia_device * link); |
| 280 | |||
| 281 | /**************** | ||
| 282 | * The attach() and detach() entry points are used to create and destroy | ||
| 283 | * "instances" of the driver, where each instance represents everything | ||
| 284 | * needed to manage one actual PCMCIA card. | ||
| 285 | */ | ||
| 286 | |||
| 287 | static void xirc2ps_detach(struct pcmcia_device *p_dev); | 272 | static void xirc2ps_detach(struct pcmcia_device *p_dev); |
| 288 | 273 | ||
| 289 | /**************** | ||
| 290 | * You'll also need to prototype all the functions that will actually | ||
| 291 | * be used to talk to your device. See 'pcmem_cs' for a good example | ||
| 292 | * of a fully self-sufficient driver; the other drivers rely more or | ||
| 293 | * less on other parts of the kernel. | ||
| 294 | */ | ||
| 295 | |||
| 296 | static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id); | 274 | static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id); |
| 297 | 275 | ||
| 298 | typedef struct local_info_t { | 276 | typedef struct local_info_t { |
| @@ -500,16 +478,6 @@ static const struct net_device_ops netdev_ops = { | |||
| 500 | .ndo_validate_addr = eth_validate_addr, | 478 | .ndo_validate_addr = eth_validate_addr, |
| 501 | }; | 479 | }; |
| 502 | 480 | ||
| 503 | /**************** | ||
| 504 | * xirc2ps_attach() creates an "instance" of the driver, allocating | ||
| 505 | * local data structures for one device. The device is registered | ||
| 506 | * with Card Services. | ||
| 507 | * | ||
| 508 | * The dev_link structure is initialized, but we don't actually | ||
| 509 | * configure the card at this point -- we wait until we receive a | ||
| 510 | * card insertion event. | ||
| 511 | */ | ||
| 512 | |||
| 513 | static int | 481 | static int |
| 514 | xirc2ps_probe(struct pcmcia_device *link) | 482 | xirc2ps_probe(struct pcmcia_device *link) |
| 515 | { | 483 | { |
| @@ -539,13 +507,6 @@ xirc2ps_probe(struct pcmcia_device *link) | |||
| 539 | return xirc2ps_config(link); | 507 | return xirc2ps_config(link); |
| 540 | } /* xirc2ps_attach */ | 508 | } /* xirc2ps_attach */ |
| 541 | 509 | ||
| 542 | /**************** | ||
| 543 | * This deletes a driver "instance". The device is de-registered | ||
| 544 | * with Card Services. If it has been released, all local data | ||
| 545 | * structures are freed. Otherwise, the structures will be freed | ||
| 546 | * when the device is released. | ||
| 547 | */ | ||
| 548 | |||
| 549 | static void | 510 | static void |
| 550 | xirc2ps_detach(struct pcmcia_device *link) | 511 | xirc2ps_detach(struct pcmcia_device *link) |
| 551 | { | 512 | { |
| @@ -733,11 +694,6 @@ static int pcmcia_get_mac_ce(struct pcmcia_device *p_dev, | |||
| 733 | }; | 694 | }; |
| 734 | 695 | ||
| 735 | 696 | ||
| 736 | /**************** | ||
| 737 | * xirc2ps_config() is scheduled to run after a CARD_INSERTION event | ||
| 738 | * is received, to configure the PCMCIA socket, and to make the | ||
| 739 | * ethernet device available to the system. | ||
| 740 | */ | ||
| 741 | static int | 697 | static int |
| 742 | xirc2ps_config(struct pcmcia_device * link) | 698 | xirc2ps_config(struct pcmcia_device * link) |
| 743 | { | 699 | { |
| @@ -861,10 +817,6 @@ xirc2ps_config(struct pcmcia_device * link) | |||
| 861 | if ((err=pcmcia_request_irq(link, xirc2ps_interrupt))) | 817 | if ((err=pcmcia_request_irq(link, xirc2ps_interrupt))) |
| 862 | goto config_error; | 818 | goto config_error; |
| 863 | 819 | ||
| 864 | /**************** | ||
| 865 | * This actually configures the PCMCIA socket -- setting up | ||
| 866 | * the I/O windows and the interrupt mapping. | ||
| 867 | */ | ||
| 868 | link->config_flags |= CONF_ENABLE_IRQ; | 820 | link->config_flags |= CONF_ENABLE_IRQ; |
| 869 | if (do_sound) | 821 | if (do_sound) |
| 870 | link->config_flags |= CONF_ENABLE_SPKR; | 822 | link->config_flags |= CONF_ENABLE_SPKR; |
| @@ -980,11 +932,6 @@ xirc2ps_config(struct pcmcia_device * link) | |||
| 980 | return -ENODEV; | 932 | return -ENODEV; |
| 981 | } /* xirc2ps_config */ | 933 | } /* xirc2ps_config */ |
| 982 | 934 | ||
| 983 | /**************** | ||
| 984 | * After a card is removed, xirc2ps_release() will unregister the net | ||
| 985 | * device, and release the PCMCIA configuration. If the device is | ||
| 986 | * still open, this will be postponed until it is closed. | ||
| 987 | */ | ||
| 988 | static void | 935 | static void |
| 989 | xirc2ps_release(struct pcmcia_device *link) | 936 | xirc2ps_release(struct pcmcia_device *link) |
| 990 | { | 937 | { |
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index b084278f36b7..df2484d45474 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
| @@ -53,42 +53,15 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards"); | |||
| 53 | 53 | ||
| 54 | /*====================================================================*/ | 54 | /*====================================================================*/ |
| 55 | 55 | ||
| 56 | /* | ||
| 57 | The event() function is this driver's Card Services event handler. | ||
| 58 | It will be called by Card Services when an appropriate card status | ||
| 59 | event is received. The config() and release() entry points are | ||
| 60 | used to configure or release a socket, in response to card | ||
| 61 | insertion and ejection events. They are invoked from the airo_cs | ||
| 62 | event handler. | ||
| 63 | */ | ||
| 64 | |||
| 65 | static int airo_config(struct pcmcia_device *link); | 56 | static int airo_config(struct pcmcia_device *link); |
| 66 | static void airo_release(struct pcmcia_device *link); | 57 | static void airo_release(struct pcmcia_device *link); |
| 67 | 58 | ||
| 68 | /* | ||
| 69 | The attach() and detach() entry points are used to create and destroy | ||
| 70 | "instances" of the driver, where each instance represents everything | ||
| 71 | needed to manage one actual PCMCIA card. | ||
| 72 | */ | ||
| 73 | |||
| 74 | static void airo_detach(struct pcmcia_device *p_dev); | 59 | static void airo_detach(struct pcmcia_device *p_dev); |
| 75 | 60 | ||
| 76 | typedef struct local_info_t { | 61 | typedef struct local_info_t { |
| 77 | struct net_device *eth_dev; | 62 | struct net_device *eth_dev; |
| 78 | } local_info_t; | 63 | } local_info_t; |
| 79 | 64 | ||
| 80 | /*====================================================================== | ||
| 81 | |||
| 82 | airo_attach() creates an "instance" of the driver, allocating | ||
| 83 | local data structures for one device. The device is registered | ||
| 84 | with Card Services. | ||
| 85 | |||
| 86 | The dev_link structure is initialized, but we don't actually | ||
| 87 | configure the card at this point -- we wait until we receive a | ||
| 88 | card insertion event. | ||
| 89 | |||
| 90 | ======================================================================*/ | ||
| 91 | |||
| 92 | static int airo_probe(struct pcmcia_device *p_dev) | 65 | static int airo_probe(struct pcmcia_device *p_dev) |
| 93 | { | 66 | { |
| 94 | local_info_t *local; | 67 | local_info_t *local; |
| @@ -106,15 +79,6 @@ static int airo_probe(struct pcmcia_device *p_dev) | |||
| 106 | return airo_config(p_dev); | 79 | return airo_config(p_dev); |
| 107 | } /* airo_attach */ | 80 | } /* airo_attach */ |
| 108 | 81 | ||
| 109 | /*====================================================================== | ||
| 110 | |||
| 111 | This deletes a driver "instance". The device is de-registered | ||
| 112 | with Card Services. If it has been released, all local data | ||
| 113 | structures are freed. Otherwise, the structures will be freed | ||
| 114 | when the device is released. | ||
| 115 | |||
| 116 | ======================================================================*/ | ||
| 117 | |||
| 118 | static void airo_detach(struct pcmcia_device *link) | 82 | static void airo_detach(struct pcmcia_device *link) |
| 119 | { | 83 | { |
| 120 | dev_dbg(&link->dev, "airo_detach\n"); | 84 | dev_dbg(&link->dev, "airo_detach\n"); |
| @@ -129,14 +93,6 @@ static void airo_detach(struct pcmcia_device *link) | |||
| 129 | kfree(link->priv); | 93 | kfree(link->priv); |
| 130 | } /* airo_detach */ | 94 | } /* airo_detach */ |
| 131 | 95 | ||
| 132 | /*====================================================================== | ||
| 133 | |||
| 134 | airo_config() is scheduled to run after a CARD_INSERTION event | ||
| 135 | is received, to configure the PCMCIA socket, and to make the | ||
| 136 | device available to the system. | ||
| 137 | |||
| 138 | ======================================================================*/ | ||
| 139 | |||
| 140 | static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) | 96 | static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) |
| 141 | { | 97 | { |
| 142 | if (p_dev->config_index == 0) | 98 | if (p_dev->config_index == 0) |
| @@ -158,20 +114,6 @@ static int airo_config(struct pcmcia_device *link) | |||
| 158 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | | 114 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | |
| 159 | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; | 115 | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; |
| 160 | 116 | ||
| 161 | /* | ||
| 162 | * In this loop, we scan the CIS for configuration table | ||
| 163 | * entries, each of which describes a valid card | ||
| 164 | * configuration, including voltage, IO window, memory window, | ||
| 165 | * and interrupt settings. | ||
| 166 | * | ||
| 167 | * We make no assumptions about the card to be configured: we | ||
| 168 | * use just the information available in the CIS. In an ideal | ||
| 169 | * world, this would work for any PCMCIA card, but it requires | ||
| 170 | * a complete and accurate CIS. In practice, a driver usually | ||
| 171 | * "knows" most of these things without consulting the CIS, | ||
| 172 | * and most client drivers will only use the CIS to fill in | ||
| 173 | * implementation-defined details. | ||
| 174 | */ | ||
| 175 | ret = pcmcia_loop_config(link, airo_cs_config_check, NULL); | 117 | ret = pcmcia_loop_config(link, airo_cs_config_check, NULL); |
| 176 | if (ret) | 118 | if (ret) |
| 177 | goto failed; | 119 | goto failed; |
| @@ -179,11 +121,6 @@ static int airo_config(struct pcmcia_device *link) | |||
| 179 | if (!link->irq) | 121 | if (!link->irq) |
| 180 | goto failed; | 122 | goto failed; |
| 181 | 123 | ||
| 182 | /* | ||
| 183 | This actually configures the PCMCIA socket -- setting up | ||
| 184 | the I/O windows and the interrupt mapping, and putting the | ||
| 185 | card and host interface into "Memory and IO" mode. | ||
| 186 | */ | ||
| 187 | ret = pcmcia_enable_device(link); | 124 | ret = pcmcia_enable_device(link); |
| 188 | if (ret) | 125 | if (ret) |
| 189 | goto failed; | 126 | goto failed; |
| @@ -200,14 +137,6 @@ static int airo_config(struct pcmcia_device *link) | |||
| 200 | return -ENODEV; | 137 | return -ENODEV; |
| 201 | } /* airo_config */ | 138 | } /* airo_config */ |
| 202 | 139 | ||
| 203 | /*====================================================================== | ||
| 204 | |||
| 205 | After a card is removed, airo_release() will unregister the | ||
| 206 | device, and release the PCMCIA configuration. If the device is | ||
| 207 | still open, this will be postponed until it is closed. | ||
| 208 | |||
| 209 | ======================================================================*/ | ||
| 210 | |||
| 211 | static void airo_release(struct pcmcia_device *link) | 140 | static void airo_release(struct pcmcia_device *link) |
| 212 | { | 141 | { |
| 213 | dev_dbg(&link->dev, "airo_release\n"); | 142 | dev_dbg(&link->dev, "airo_release\n"); |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index fabe91a8db2b..c96e19da2949 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
| @@ -63,42 +63,15 @@ MODULE_SUPPORTED_DEVICE("Atmel at76c50x PCMCIA cards"); | |||
| 63 | 63 | ||
| 64 | /*====================================================================*/ | 64 | /*====================================================================*/ |
| 65 | 65 | ||
| 66 | /* | ||
| 67 | The event() function is this driver's Card Services event handler. | ||
| 68 | It will be called by Card Services when an appropriate card status | ||
| 69 | event is received. The config() and release() entry points are | ||
| 70 | used to configure or release a socket, in response to card | ||
| 71 | insertion and ejection events. They are invoked from the atmel_cs | ||
| 72 | event handler. | ||
| 73 | */ | ||
| 74 | |||
| 75 | static int atmel_config(struct pcmcia_device *link); | 66 | static int atmel_config(struct pcmcia_device *link); |
| 76 | static void atmel_release(struct pcmcia_device *link); | 67 | static void atmel_release(struct pcmcia_device *link); |
| 77 | 68 | ||
| 78 | /* | ||
| 79 | The attach() and detach() entry points are used to create and destroy | ||
| 80 | "instances" of the driver, where each instance represents everything | ||
| 81 | needed to manage one actual PCMCIA card. | ||
| 82 | */ | ||
| 83 | |||
| 84 | static void atmel_detach(struct pcmcia_device *p_dev); | 69 | static void atmel_detach(struct pcmcia_device *p_dev); |
| 85 | 70 | ||
| 86 | typedef struct local_info_t { | 71 | typedef struct local_info_t { |
| 87 | struct net_device *eth_dev; | 72 | struct net_device *eth_dev; |
| 88 | } local_info_t; | 73 | } local_info_t; |
| 89 | 74 | ||
| 90 | /*====================================================================== | ||
| 91 | |||
| 92 | atmel_attach() creates an "instance" of the driver, allocating | ||
| 93 | local data structures for one device. The device is registered | ||
| 94 | with Card Services. | ||
| 95 | |||
| 96 | The dev_link structure is initialized, but we don't actually | ||
| 97 | configure the card at this point -- we wait until we receive a | ||
| 98 | card insertion event. | ||
| 99 | |||
| 100 | ======================================================================*/ | ||
| 101 | |||
| 102 | static int atmel_probe(struct pcmcia_device *p_dev) | 75 | static int atmel_probe(struct pcmcia_device *p_dev) |
| 103 | { | 76 | { |
| 104 | local_info_t *local; | 77 | local_info_t *local; |
| @@ -116,15 +89,6 @@ static int atmel_probe(struct pcmcia_device *p_dev) | |||
| 116 | return atmel_config(p_dev); | 89 | return atmel_config(p_dev); |
| 117 | } /* atmel_attach */ | 90 | } /* atmel_attach */ |
| 118 | 91 | ||
| 119 | /*====================================================================== | ||
| 120 | |||
| 121 | This deletes a driver "instance". The device is de-registered | ||
| 122 | with Card Services. If it has been released, all local data | ||
| 123 | structures are freed. Otherwise, the structures will be freed | ||
| 124 | when the device is released. | ||
| 125 | |||
| 126 | ======================================================================*/ | ||
| 127 | |||
| 128 | static void atmel_detach(struct pcmcia_device *link) | 92 | static void atmel_detach(struct pcmcia_device *link) |
| 129 | { | 93 | { |
| 130 | dev_dbg(&link->dev, "atmel_detach\n"); | 94 | dev_dbg(&link->dev, "atmel_detach\n"); |
| @@ -134,14 +98,6 @@ static void atmel_detach(struct pcmcia_device *link) | |||
| 134 | kfree(link->priv); | 98 | kfree(link->priv); |
| 135 | } | 99 | } |
| 136 | 100 | ||
| 137 | /*====================================================================== | ||
| 138 | |||
| 139 | atmel_config() is scheduled to run after a CARD_INSERTION event | ||
| 140 | is received, to configure the PCMCIA socket, and to make the | ||
| 141 | device available to the system. | ||
| 142 | |||
| 143 | ======================================================================*/ | ||
| 144 | |||
| 145 | /* Call-back function to interrogate PCMCIA-specific information | 101 | /* Call-back function to interrogate PCMCIA-specific information |
| 146 | about the current existance of the card */ | 102 | about the current existance of the card */ |
| 147 | static int card_present(void *arg) | 103 | static int card_present(void *arg) |
| @@ -176,18 +132,6 @@ static int atmel_config(struct pcmcia_device *link) | |||
| 176 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | | 132 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | |
| 177 | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; | 133 | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; |
| 178 | 134 | ||
| 179 | /* | ||
| 180 | In this loop, we scan the CIS for configuration table entries, | ||
| 181 | each of which describes a valid card configuration, including | ||
| 182 | voltage, IO window, memory window, and interrupt settings. | ||
| 183 | |||
| 184 | We make no assumptions about the card to be configured: we use | ||
| 185 | just the information available in the CIS. In an ideal world, | ||
| 186 | this would work for any PCMCIA card, but it requires a complete | ||
| 187 | and accurate CIS. In practice, a driver usually "knows" most of | ||
| 188 | these things without consulting the CIS, and most client drivers | ||
| 189 | will only use the CIS to fill in implementation-defined details. | ||
| 190 | */ | ||
| 191 | if (pcmcia_loop_config(link, atmel_config_check, NULL)) | 135 | if (pcmcia_loop_config(link, atmel_config_check, NULL)) |
| 192 | goto failed; | 136 | goto failed; |
| 193 | 137 | ||
| @@ -196,11 +140,6 @@ static int atmel_config(struct pcmcia_device *link) | |||
| 196 | goto failed; | 140 | goto failed; |
| 197 | } | 141 | } |
| 198 | 142 | ||
| 199 | /* | ||
| 200 | This actually configures the PCMCIA socket -- setting up | ||
| 201 | the I/O windows and the interrupt mapping, and putting the | ||
| 202 | card and host interface into "Memory and IO" mode. | ||
| 203 | */ | ||
| 204 | ret = pcmcia_enable_device(link); | 143 | ret = pcmcia_enable_device(link); |
| 205 | if (ret) | 144 | if (ret) |
| 206 | goto failed; | 145 | goto failed; |
| @@ -223,14 +162,6 @@ static int atmel_config(struct pcmcia_device *link) | |||
| 223 | return -ENODEV; | 162 | return -ENODEV; |
| 224 | } | 163 | } |
| 225 | 164 | ||
| 226 | /*====================================================================== | ||
| 227 | |||
| 228 | After a card is removed, atmel_release() will unregister the | ||
| 229 | device, and release the PCMCIA configuration. If the device is | ||
| 230 | still open, this will be postponed until it is closed. | ||
| 231 | |||
| 232 | ======================================================================*/ | ||
| 233 | |||
| 234 | static void atmel_release(struct pcmcia_device *link) | 165 | static void atmel_release(struct pcmcia_device *link) |
| 235 | { | 166 | { |
| 236 | struct net_device *dev = ((local_info_t*)link->priv)->eth_dev; | 167 | struct net_device *dev = ((local_info_t*)link->priv)->eth_dev; |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index ba645701179a..bd8a4134edeb 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
| @@ -466,9 +466,6 @@ static void prism2_detach(struct pcmcia_device *link) | |||
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | 468 | ||
| 469 | /* run after a CARD_INSERTION event is received to configure the PCMCIA | ||
| 470 | * socket and make the device available to the system */ | ||
| 471 | |||
| 472 | static int prism2_config_check(struct pcmcia_device *p_dev, void *priv_data) | 469 | static int prism2_config_check(struct pcmcia_device *p_dev, void *priv_data) |
| 473 | { | 470 | { |
| 474 | if (p_dev->config_index == 0) | 471 | if (p_dev->config_index == 0) |
| @@ -530,11 +527,6 @@ static int prism2_config(struct pcmcia_device *link) | |||
| 530 | if (ret) | 527 | if (ret) |
| 531 | goto failed_unlock; | 528 | goto failed_unlock; |
| 532 | 529 | ||
| 533 | /* | ||
| 534 | * This actually configures the PCMCIA socket -- setting up | ||
| 535 | * the I/O windows and the interrupt mapping, and putting the | ||
| 536 | * card and host interface into "Memory and IO" mode. | ||
| 537 | */ | ||
| 538 | ret = pcmcia_enable_device(link); | 530 | ret = pcmcia_enable_device(link); |
| 539 | if (ret) | 531 | if (ret) |
| 540 | goto failed_unlock; | 532 | goto failed_unlock; |
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index c2bd2f0304bb..ff1280f41336 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
| @@ -760,15 +760,6 @@ static int if_cs_host_to_card(struct lbs_private *priv, | |||
| 760 | } | 760 | } |
| 761 | 761 | ||
| 762 | 762 | ||
| 763 | /********************************************************************/ | ||
| 764 | /* Card Services */ | ||
| 765 | /********************************************************************/ | ||
| 766 | |||
| 767 | /* | ||
| 768 | * After a card is removed, if_cs_release() will unregister the | ||
| 769 | * device, and release the PCMCIA configuration. If the device is | ||
| 770 | * still open, this will be postponed until it is closed. | ||
| 771 | */ | ||
| 772 | static void if_cs_release(struct pcmcia_device *p_dev) | 763 | static void if_cs_release(struct pcmcia_device *p_dev) |
| 773 | { | 764 | { |
| 774 | struct if_cs_card *card = p_dev->priv; | 765 | struct if_cs_card *card = p_dev->priv; |
| @@ -784,16 +775,6 @@ static void if_cs_release(struct pcmcia_device *p_dev) | |||
| 784 | } | 775 | } |
| 785 | 776 | ||
| 786 | 777 | ||
| 787 | /* | ||
| 788 | * This creates an "instance" of the driver, allocating local data | ||
| 789 | * structures for one device. The device is registered with Card | ||
| 790 | * Services. | ||
| 791 | * | ||
| 792 | * The dev_link structure is initialized, but we don't actually | ||
| 793 | * configure the card at this point -- we wait until we receive a card | ||
| 794 | * insertion event. | ||
| 795 | */ | ||
| 796 | |||
| 797 | static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) | 778 | static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) |
| 798 | { | 779 | { |
| 799 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; | 780 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
| @@ -849,11 +830,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
| 849 | goto out1; | 830 | goto out1; |
| 850 | } | 831 | } |
| 851 | 832 | ||
| 852 | /* | ||
| 853 | * This actually configures the PCMCIA socket -- setting up | ||
| 854 | * the I/O windows and the interrupt mapping, and putting the | ||
| 855 | * card and host interface into "Memory and IO" mode. | ||
| 856 | */ | ||
| 857 | ret = pcmcia_enable_device(p_dev); | 833 | ret = pcmcia_enable_device(p_dev); |
| 858 | if (ret) { | 834 | if (ret) { |
| 859 | lbs_pr_err("error in pcmcia_enable_device\n"); | 835 | lbs_pr_err("error in pcmcia_enable_device\n"); |
| @@ -950,12 +926,6 @@ out: | |||
| 950 | } | 926 | } |
| 951 | 927 | ||
| 952 | 928 | ||
| 953 | /* | ||
| 954 | * This deletes a driver "instance". The device is de-registered with | ||
| 955 | * Card Services. If it has been released, all local data structures | ||
| 956 | * are freed. Otherwise, the structures will be freed when the device | ||
| 957 | * is released. | ||
| 958 | */ | ||
| 959 | static void if_cs_detach(struct pcmcia_device *p_dev) | 929 | static void if_cs_detach(struct pcmcia_device *p_dev) |
| 960 | { | 930 | { |
| 961 | struct if_cs_card *card = p_dev->priv; | 931 | struct if_cs_card *card = p_dev->priv; |
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 2b1f554af0b2..71b3d68b9403 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c | |||
| @@ -92,14 +92,6 @@ orinoco_cs_hard_reset(struct orinoco_private *priv) | |||
| 92 | /* PCMCIA stuff */ | 92 | /* PCMCIA stuff */ |
| 93 | /********************************************************************/ | 93 | /********************************************************************/ |
| 94 | 94 | ||
| 95 | /* | ||
| 96 | * This creates an "instance" of the driver, allocating local data | ||
| 97 | * structures for one device. The device is registered with Card | ||
| 98 | * Services. | ||
| 99 | * | ||
| 100 | * The dev_link structure is initialized, but we don't actually | ||
| 101 | * configure the card at this point -- we wait until we receive a card | ||
| 102 | * insertion event. */ | ||
| 103 | static int | 95 | static int |
| 104 | orinoco_cs_probe(struct pcmcia_device *link) | 96 | orinoco_cs_probe(struct pcmcia_device *link) |
| 105 | { | 97 | { |
| @@ -119,12 +111,6 @@ orinoco_cs_probe(struct pcmcia_device *link) | |||
| 119 | return orinoco_cs_config(link); | 111 | return orinoco_cs_config(link); |
| 120 | } /* orinoco_cs_attach */ | 112 | } /* orinoco_cs_attach */ |
| 121 | 113 | ||
| 122 | /* | ||
| 123 | * This deletes a driver "instance". The device is de-registered with | ||
| 124 | * Card Services. If it has been released, all local data structures | ||
| 125 | * are freed. Otherwise, the structures will be freed when the device | ||
| 126 | * is released. | ||
| 127 | */ | ||
| 128 | static void orinoco_cs_detach(struct pcmcia_device *link) | 114 | static void orinoco_cs_detach(struct pcmcia_device *link) |
| 129 | { | 115 | { |
| 130 | struct orinoco_private *priv = link->priv; | 116 | struct orinoco_private *priv = link->priv; |
| @@ -136,12 +122,6 @@ static void orinoco_cs_detach(struct pcmcia_device *link) | |||
| 136 | free_orinocodev(priv); | 122 | free_orinocodev(priv); |
| 137 | } /* orinoco_cs_detach */ | 123 | } /* orinoco_cs_detach */ |
| 138 | 124 | ||
| 139 | /* | ||
| 140 | * orinoco_cs_config() is scheduled to run after a CARD_INSERTION | ||
| 141 | * event is received, to configure the PCMCIA socket, and to make the | ||
| 142 | * device available to the system. | ||
| 143 | */ | ||
| 144 | |||
| 145 | static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) | 125 | static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) |
| 146 | { | 126 | { |
| 147 | if (p_dev->config_index == 0) | 127 | if (p_dev->config_index == 0) |
| @@ -158,20 +138,6 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 158 | int ret; | 138 | int ret; |
| 159 | void __iomem *mem; | 139 | void __iomem *mem; |
| 160 | 140 | ||
| 161 | /* | ||
| 162 | * In this loop, we scan the CIS for configuration table | ||
| 163 | * entries, each of which describes a valid card | ||
| 164 | * configuration, including voltage, IO window, memory window, | ||
| 165 | * and interrupt settings. | ||
| 166 | * | ||
| 167 | * We make no assumptions about the card to be configured: we | ||
| 168 | * use just the information available in the CIS. In an ideal | ||
| 169 | * world, this would work for any PCMCIA card, but it requires | ||
| 170 | * a complete and accurate CIS. In practice, a driver usually | ||
| 171 | * "knows" most of these things without consulting the CIS, | ||
| 172 | * and most client drivers will only use the CIS to fill in | ||
| 173 | * implementation-defined details. | ||
| 174 | */ | ||
| 175 | link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | | 141 | link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | |
| 176 | CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; | 142 | CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; |
| 177 | if (ignore_cis_vcc) | 143 | if (ignore_cis_vcc) |
| @@ -199,11 +165,6 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 199 | 165 | ||
| 200 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 166 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 201 | 167 | ||
| 202 | /* | ||
| 203 | * This actually configures the PCMCIA socket -- setting up | ||
| 204 | * the I/O windows and the interrupt mapping, and putting the | ||
| 205 | * card and host interface into "Memory and IO" mode. | ||
| 206 | */ | ||
| 207 | ret = pcmcia_enable_device(link); | 168 | ret = pcmcia_enable_device(link); |
| 208 | if (ret) | 169 | if (ret) |
| 209 | goto failed; | 170 | goto failed; |
| @@ -228,11 +189,6 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 228 | return -ENODEV; | 189 | return -ENODEV; |
| 229 | } /* orinoco_cs_config */ | 190 | } /* orinoco_cs_config */ |
| 230 | 191 | ||
| 231 | /* | ||
| 232 | * After a card is removed, orinoco_cs_release() will unregister the | ||
| 233 | * device, and release the PCMCIA configuration. If the device is | ||
| 234 | * still open, this will be postponed until it is closed. | ||
| 235 | */ | ||
| 236 | static void | 192 | static void |
| 237 | orinoco_cs_release(struct pcmcia_device *link) | 193 | orinoco_cs_release(struct pcmcia_device *link) |
| 238 | { | 194 | { |
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index 1314cf204f12..fb859a5ad2eb 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c | |||
| @@ -153,14 +153,6 @@ spectrum_cs_stop_firmware(struct orinoco_private *priv, int idle) | |||
| 153 | /* PCMCIA stuff */ | 153 | /* PCMCIA stuff */ |
| 154 | /********************************************************************/ | 154 | /********************************************************************/ |
| 155 | 155 | ||
| 156 | /* | ||
| 157 | * This creates an "instance" of the driver, allocating local data | ||
| 158 | * structures for one device. The device is registered with Card | ||
| 159 | * Services. | ||
| 160 | * | ||
| 161 | * The dev_link structure is initialized, but we don't actually | ||
| 162 | * configure the card at this point -- we wait until we receive a card | ||
| 163 | * insertion event. */ | ||
| 164 | static int | 156 | static int |
| 165 | spectrum_cs_probe(struct pcmcia_device *link) | 157 | spectrum_cs_probe(struct pcmcia_device *link) |
| 166 | { | 158 | { |
| @@ -181,12 +173,6 @@ spectrum_cs_probe(struct pcmcia_device *link) | |||
| 181 | return spectrum_cs_config(link); | 173 | return spectrum_cs_config(link); |
| 182 | } /* spectrum_cs_attach */ | 174 | } /* spectrum_cs_attach */ |
| 183 | 175 | ||
| 184 | /* | ||
| 185 | * This deletes a driver "instance". The device is de-registered with | ||
| 186 | * Card Services. If it has been released, all local data structures | ||
| 187 | * are freed. Otherwise, the structures will be freed when the device | ||
| 188 | * is released. | ||
| 189 | */ | ||
| 190 | static void spectrum_cs_detach(struct pcmcia_device *link) | 176 | static void spectrum_cs_detach(struct pcmcia_device *link) |
| 191 | { | 177 | { |
| 192 | struct orinoco_private *priv = link->priv; | 178 | struct orinoco_private *priv = link->priv; |
| @@ -198,12 +184,6 @@ static void spectrum_cs_detach(struct pcmcia_device *link) | |||
| 198 | free_orinocodev(priv); | 184 | free_orinocodev(priv); |
| 199 | } /* spectrum_cs_detach */ | 185 | } /* spectrum_cs_detach */ |
| 200 | 186 | ||
| 201 | /* | ||
| 202 | * spectrum_cs_config() is scheduled to run after a CARD_INSERTION | ||
| 203 | * event is received, to configure the PCMCIA socket, and to make the | ||
| 204 | * device available to the system. | ||
| 205 | */ | ||
| 206 | |||
| 207 | static int spectrum_cs_config_check(struct pcmcia_device *p_dev, | 187 | static int spectrum_cs_config_check(struct pcmcia_device *p_dev, |
| 208 | void *priv_data) | 188 | void *priv_data) |
| 209 | { | 189 | { |
| @@ -221,20 +201,6 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 221 | int ret; | 201 | int ret; |
| 222 | void __iomem *mem; | 202 | void __iomem *mem; |
| 223 | 203 | ||
| 224 | /* | ||
| 225 | * In this loop, we scan the CIS for configuration table | ||
| 226 | * entries, each of which describes a valid card | ||
| 227 | * configuration, including voltage, IO window, memory window, | ||
| 228 | * and interrupt settings. | ||
| 229 | * | ||
| 230 | * We make no assumptions about the card to be configured: we | ||
| 231 | * use just the information available in the CIS. In an ideal | ||
| 232 | * world, this would work for any PCMCIA card, but it requires | ||
| 233 | * a complete and accurate CIS. In practice, a driver usually | ||
| 234 | * "knows" most of these things without consulting the CIS, | ||
| 235 | * and most client drivers will only use the CIS to fill in | ||
| 236 | * implementation-defined details. | ||
| 237 | */ | ||
| 238 | link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | | 204 | link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | |
| 239 | CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; | 205 | CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; |
| 240 | if (ignore_cis_vcc) | 206 | if (ignore_cis_vcc) |
| @@ -263,11 +229,6 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 263 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 229 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 264 | hw->eeprom_pda = true; | 230 | hw->eeprom_pda = true; |
| 265 | 231 | ||
| 266 | /* | ||
| 267 | * This actually configures the PCMCIA socket -- setting up | ||
| 268 | * the I/O windows and the interrupt mapping, and putting the | ||
| 269 | * card and host interface into "Memory and IO" mode. | ||
| 270 | */ | ||
| 271 | ret = pcmcia_enable_device(link); | 232 | ret = pcmcia_enable_device(link); |
| 272 | if (ret) | 233 | if (ret) |
| 273 | goto failed; | 234 | goto failed; |
| @@ -296,11 +257,6 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 296 | return -ENODEV; | 257 | return -ENODEV; |
| 297 | } /* spectrum_cs_config */ | 258 | } /* spectrum_cs_config */ |
| 298 | 259 | ||
| 299 | /* | ||
| 300 | * After a card is removed, spectrum_cs_release() will unregister the | ||
| 301 | * device, and release the PCMCIA configuration. If the device is | ||
| 302 | * still open, this will be postponed until it is closed. | ||
| 303 | */ | ||
| 304 | static void | 260 | static void |
| 305 | spectrum_cs_release(struct pcmcia_device *link) | 261 | spectrum_cs_release(struct pcmcia_device *link) |
| 306 | { | 262 | { |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index b5a2c9e31de2..af5b17ce5a15 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
| @@ -168,13 +168,6 @@ static int bc; | |||
| 168 | */ | 168 | */ |
| 169 | static char *phy_addr = NULL; | 169 | static char *phy_addr = NULL; |
| 170 | 170 | ||
| 171 | |||
| 172 | /* A struct pcmcia_device structure has fields for most things that are needed | ||
| 173 | to keep track of a socket, but there will usually be some device | ||
| 174 | specific information that also needs to be kept track of. The | ||
| 175 | 'priv' pointer in a struct pcmcia_device structure can be used to point to | ||
| 176 | a device-specific private data structure, like this. | ||
| 177 | */ | ||
| 178 | static unsigned int ray_mem_speed = 500; | 171 | static unsigned int ray_mem_speed = 500; |
| 179 | 172 | ||
| 180 | /* WARNING: THIS DRIVER IS NOT CAPABLE OF HANDLING MULTIPLE DEVICES! */ | 173 | /* WARNING: THIS DRIVER IS NOT CAPABLE OF HANDLING MULTIPLE DEVICES! */ |
| @@ -289,14 +282,6 @@ static const struct net_device_ops ray_netdev_ops = { | |||
| 289 | .ndo_validate_addr = eth_validate_addr, | 282 | .ndo_validate_addr = eth_validate_addr, |
| 290 | }; | 283 | }; |
| 291 | 284 | ||
| 292 | /*============================================================================= | ||
| 293 | ray_attach() creates an "instance" of the driver, allocating | ||
| 294 | local data structures for one device. The device is registered | ||
| 295 | with Card Services. | ||
| 296 | The dev_link structure is initialized, but we don't actually | ||
| 297 | configure the card at this point -- we wait until we receive a | ||
| 298 | card insertion event. | ||
| 299 | =============================================================================*/ | ||
| 300 | static int ray_probe(struct pcmcia_device *p_dev) | 285 | static int ray_probe(struct pcmcia_device *p_dev) |
| 301 | { | 286 | { |
| 302 | ray_dev_t *local; | 287 | ray_dev_t *local; |
| @@ -351,12 +336,6 @@ fail_alloc_dev: | |||
| 351 | return -ENOMEM; | 336 | return -ENOMEM; |
| 352 | } /* ray_attach */ | 337 | } /* ray_attach */ |
| 353 | 338 | ||
| 354 | /*============================================================================= | ||
| 355 | This deletes a driver "instance". The device is de-registered | ||
| 356 | with Card Services. If it has been released, all local data | ||
| 357 | structures are freed. Otherwise, the structures will be freed | ||
| 358 | when the device is released. | ||
| 359 | =============================================================================*/ | ||
| 360 | static void ray_detach(struct pcmcia_device *link) | 339 | static void ray_detach(struct pcmcia_device *link) |
| 361 | { | 340 | { |
| 362 | struct net_device *dev; | 341 | struct net_device *dev; |
| @@ -379,11 +358,6 @@ static void ray_detach(struct pcmcia_device *link) | |||
| 379 | dev_dbg(&link->dev, "ray_cs ray_detach ending\n"); | 358 | dev_dbg(&link->dev, "ray_cs ray_detach ending\n"); |
| 380 | } /* ray_detach */ | 359 | } /* ray_detach */ |
| 381 | 360 | ||
| 382 | /*============================================================================= | ||
| 383 | ray_config() is run after a CARD_INSERTION event | ||
| 384 | is received, to configure the PCMCIA socket, and to make the | ||
| 385 | ethernet device available to the system. | ||
| 386 | =============================================================================*/ | ||
| 387 | #define MAX_TUPLE_SIZE 128 | 361 | #define MAX_TUPLE_SIZE 128 |
| 388 | static int ray_config(struct pcmcia_device *link) | 362 | static int ray_config(struct pcmcia_device *link) |
| 389 | { | 363 | { |
| @@ -409,9 +383,6 @@ static int ray_config(struct pcmcia_device *link) | |||
| 409 | goto failed; | 383 | goto failed; |
| 410 | dev->irq = link->irq; | 384 | dev->irq = link->irq; |
| 411 | 385 | ||
| 412 | /* This actually configures the PCMCIA socket -- setting up | ||
| 413 | the I/O windows and the interrupt mapping. | ||
| 414 | */ | ||
| 415 | ret = pcmcia_enable_device(link); | 386 | ret = pcmcia_enable_device(link); |
| 416 | if (ret) | 387 | if (ret) |
| 417 | goto failed; | 388 | goto failed; |
| @@ -771,11 +742,7 @@ static void join_net(u_long data) | |||
| 771 | local->card_status = CARD_DOING_ACQ; | 742 | local->card_status = CARD_DOING_ACQ; |
| 772 | } | 743 | } |
| 773 | 744 | ||
| 774 | /*============================================================================ | 745 | |
| 775 | After a card is removed, ray_release() will unregister the net | ||
| 776 | device, and release the PCMCIA configuration. If the device is | ||
| 777 | still open, this will be postponed until it is closed. | ||
| 778 | =============================================================================*/ | ||
| 779 | static void ray_release(struct pcmcia_device *link) | 746 | static void ray_release(struct pcmcia_device *link) |
| 780 | { | 747 | { |
| 781 | struct net_device *dev = link->priv; | 748 | struct net_device *dev = link->priv; |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index d3ed38f558fa..ca3f8961fa27 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
| @@ -77,13 +77,6 @@ | |||
| 77 | #define WL3501_RESUME 0 | 77 | #define WL3501_RESUME 0 |
| 78 | #define WL3501_SUSPEND 1 | 78 | #define WL3501_SUSPEND 1 |
| 79 | 79 | ||
| 80 | /* | ||
| 81 | * The event() function is this driver's Card Services event handler. It will | ||
| 82 | * be called by Card Services when an appropriate card status event is | ||
| 83 | * received. The config() and release() entry points are used to configure or | ||
| 84 | * release a socket, in response to card insertion and ejection events. They | ||
| 85 | * are invoked from the wl24 event handler. | ||
| 86 | */ | ||
| 87 | static int wl3501_config(struct pcmcia_device *link); | 80 | static int wl3501_config(struct pcmcia_device *link); |
| 88 | static void wl3501_release(struct pcmcia_device *link); | 81 | static void wl3501_release(struct pcmcia_device *link); |
| 89 | 82 | ||
| @@ -1868,15 +1861,6 @@ static const struct net_device_ops wl3501_netdev_ops = { | |||
| 1868 | .ndo_validate_addr = eth_validate_addr, | 1861 | .ndo_validate_addr = eth_validate_addr, |
| 1869 | }; | 1862 | }; |
| 1870 | 1863 | ||
| 1871 | /** | ||
| 1872 | * wl3501_attach - creates an "instance" of the driver | ||
| 1873 | * | ||
| 1874 | * Creates an "instance" of the driver, allocating local data structures for | ||
| 1875 | * one device. The device is registered with Card Services. | ||
| 1876 | * | ||
| 1877 | * The dev_link structure is initialized, but we don't actually configure the | ||
| 1878 | * card at this point -- we wait until we receive a card insertion event. | ||
| 1879 | */ | ||
| 1880 | static int wl3501_probe(struct pcmcia_device *p_dev) | 1864 | static int wl3501_probe(struct pcmcia_device *p_dev) |
| 1881 | { | 1865 | { |
| 1882 | struct net_device *dev; | 1866 | struct net_device *dev; |
| @@ -1912,14 +1896,6 @@ out_link: | |||
| 1912 | return -ENOMEM; | 1896 | return -ENOMEM; |
| 1913 | } | 1897 | } |
| 1914 | 1898 | ||
| 1915 | /** | ||
| 1916 | * wl3501_config - configure the PCMCIA socket and make eth device available | ||
| 1917 | * @link - FILL_IN | ||
| 1918 | * | ||
| 1919 | * wl3501_config() is scheduled to run after a CARD_INSERTION event is | ||
| 1920 | * received, to configure the PCMCIA socket, and to make the ethernet device | ||
| 1921 | * available to the system. | ||
| 1922 | */ | ||
| 1923 | static int wl3501_config(struct pcmcia_device *link) | 1899 | static int wl3501_config(struct pcmcia_device *link) |
| 1924 | { | 1900 | { |
| 1925 | struct net_device *dev = link->priv; | 1901 | struct net_device *dev = link->priv; |
| @@ -1950,9 +1926,6 @@ static int wl3501_config(struct pcmcia_device *link) | |||
| 1950 | if (ret) | 1926 | if (ret) |
| 1951 | goto failed; | 1927 | goto failed; |
| 1952 | 1928 | ||
| 1953 | /* This actually configures the PCMCIA socket -- setting up the I/O | ||
| 1954 | * windows and the interrupt mapping. */ | ||
| 1955 | |||
| 1956 | ret = pcmcia_enable_device(link); | 1929 | ret = pcmcia_enable_device(link); |
| 1957 | if (ret) | 1930 | if (ret) |
| 1958 | goto failed; | 1931 | goto failed; |
| @@ -2008,14 +1981,6 @@ failed: | |||
| 2008 | return -ENODEV; | 1981 | return -ENODEV; |
| 2009 | } | 1982 | } |
| 2010 | 1983 | ||
| 2011 | /** | ||
| 2012 | * wl3501_release - unregister the net, release PCMCIA configuration | ||
| 2013 | * @arg - link | ||
| 2014 | * | ||
| 2015 | * After a card is removed, wl3501_release() will unregister the net device, | ||
| 2016 | * and release the PCMCIA configuration. If the device is still open, this | ||
| 2017 | * will be postponed until it is closed. | ||
| 2018 | */ | ||
| 2019 | static void wl3501_release(struct pcmcia_device *link) | 1984 | static void wl3501_release(struct pcmcia_device *link) |
| 2020 | { | 1985 | { |
| 2021 | pcmcia_disable_device(link); | 1986 | pcmcia_disable_device(link); |
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c index 6f4c9560b2b9..787ebdeae310 100644 --- a/drivers/parport/parport_cs.c +++ b/drivers/parport/parport_cs.c | |||
| @@ -80,14 +80,6 @@ static void parport_detach(struct pcmcia_device *p_dev); | |||
| 80 | static int parport_config(struct pcmcia_device *link); | 80 | static int parport_config(struct pcmcia_device *link); |
| 81 | static void parport_cs_release(struct pcmcia_device *); | 81 | static void parport_cs_release(struct pcmcia_device *); |
| 82 | 82 | ||
| 83 | /*====================================================================== | ||
| 84 | |||
| 85 | parport_attach() creates an "instance" of the driver, allocating | ||
| 86 | local data structures for one device. The device is registered | ||
| 87 | with Card Services. | ||
| 88 | |||
| 89 | ======================================================================*/ | ||
| 90 | |||
| 91 | static int parport_probe(struct pcmcia_device *link) | 83 | static int parport_probe(struct pcmcia_device *link) |
| 92 | { | 84 | { |
| 93 | parport_info_t *info; | 85 | parport_info_t *info; |
| @@ -105,15 +97,6 @@ static int parport_probe(struct pcmcia_device *link) | |||
| 105 | return parport_config(link); | 97 | return parport_config(link); |
| 106 | } /* parport_attach */ | 98 | } /* parport_attach */ |
| 107 | 99 | ||
| 108 | /*====================================================================== | ||
| 109 | |||
| 110 | This deletes a driver "instance". The device is de-registered | ||
| 111 | with Card Services. If it has been released, all local data | ||
| 112 | structures are freed. Otherwise, the structures will be freed | ||
| 113 | when the device is released. | ||
| 114 | |||
| 115 | ======================================================================*/ | ||
| 116 | |||
| 117 | static void parport_detach(struct pcmcia_device *link) | 100 | static void parport_detach(struct pcmcia_device *link) |
| 118 | { | 101 | { |
| 119 | dev_dbg(&link->dev, "parport_detach\n"); | 102 | dev_dbg(&link->dev, "parport_detach\n"); |
| @@ -123,14 +106,6 @@ static void parport_detach(struct pcmcia_device *link) | |||
| 123 | kfree(link->priv); | 106 | kfree(link->priv); |
| 124 | } /* parport_detach */ | 107 | } /* parport_detach */ |
| 125 | 108 | ||
| 126 | /*====================================================================== | ||
| 127 | |||
| 128 | parport_config() is scheduled to run after a CARD_INSERTION event | ||
| 129 | is received, to configure the PCMCIA socket, and to make the | ||
| 130 | parport device available to the system. | ||
| 131 | |||
| 132 | ======================================================================*/ | ||
| 133 | |||
| 134 | static int parport_config_check(struct pcmcia_device *p_dev, void *priv_data) | 109 | static int parport_config_check(struct pcmcia_device *p_dev, void *priv_data) |
| 135 | { | 110 | { |
| 136 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; | 111 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
| @@ -187,14 +162,6 @@ failed: | |||
| 187 | return -ENODEV; | 162 | return -ENODEV; |
| 188 | } /* parport_config */ | 163 | } /* parport_config */ |
| 189 | 164 | ||
| 190 | /*====================================================================== | ||
| 191 | |||
| 192 | After a card is removed, parport_cs_release() will unregister the | ||
| 193 | device, and release the PCMCIA configuration. If the device is | ||
| 194 | still open, this will be postponed until it is closed. | ||
| 195 | |||
| 196 | ======================================================================*/ | ||
| 197 | |||
| 198 | static void parport_cs_release(struct pcmcia_device *link) | 165 | static void parport_cs_release(struct pcmcia_device *link) |
| 199 | { | 166 | { |
| 200 | parport_info_t *info = link->priv; | 167 | parport_info_t *info = link->priv; |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 07b73ca2a7e0..9326c2c14880 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
| @@ -1530,15 +1530,6 @@ static int nsp_eh_host_reset(struct scsi_cmnd *SCpnt) | |||
| 1530 | PCMCIA functions | 1530 | PCMCIA functions |
| 1531 | **********************************************************************/ | 1531 | **********************************************************************/ |
| 1532 | 1532 | ||
| 1533 | /*====================================================================== | ||
| 1534 | nsp_cs_attach() creates an "instance" of the driver, allocating | ||
| 1535 | local data structures for one device. The device is registered | ||
| 1536 | with Card Services. | ||
| 1537 | |||
| 1538 | The dev_link structure is initialized, but we don't actually | ||
| 1539 | configure the card at this point -- we wait until we receive a | ||
| 1540 | card insertion event. | ||
| 1541 | ======================================================================*/ | ||
| 1542 | static int nsp_cs_probe(struct pcmcia_device *link) | 1533 | static int nsp_cs_probe(struct pcmcia_device *link) |
| 1543 | { | 1534 | { |
| 1544 | scsi_info_t *info; | 1535 | scsi_info_t *info; |
| @@ -1563,12 +1554,6 @@ static int nsp_cs_probe(struct pcmcia_device *link) | |||
| 1563 | } /* nsp_cs_attach */ | 1554 | } /* nsp_cs_attach */ |
| 1564 | 1555 | ||
| 1565 | 1556 | ||
| 1566 | /*====================================================================== | ||
| 1567 | This deletes a driver "instance". The device is de-registered | ||
| 1568 | with Card Services. If it has been released, all local data | ||
| 1569 | structures are freed. Otherwise, the structures will be freed | ||
| 1570 | when the device is released. | ||
| 1571 | ======================================================================*/ | ||
| 1572 | static void nsp_cs_detach(struct pcmcia_device *link) | 1557 | static void nsp_cs_detach(struct pcmcia_device *link) |
| 1573 | { | 1558 | { |
| 1574 | nsp_dbg(NSP_DEBUG_INIT, "in, link=0x%p", link); | 1559 | nsp_dbg(NSP_DEBUG_INIT, "in, link=0x%p", link); |
| @@ -1581,12 +1566,6 @@ static void nsp_cs_detach(struct pcmcia_device *link) | |||
| 1581 | } /* nsp_cs_detach */ | 1566 | } /* nsp_cs_detach */ |
| 1582 | 1567 | ||
| 1583 | 1568 | ||
| 1584 | /*====================================================================== | ||
| 1585 | nsp_cs_config() is scheduled to run after a CARD_INSERTION event | ||
| 1586 | is received, to configure the PCMCIA socket, and to make the | ||
| 1587 | ethernet device available to the system. | ||
| 1588 | ======================================================================*/ | ||
| 1589 | |||
| 1590 | static int nsp_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) | 1569 | static int nsp_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) |
| 1591 | { | 1570 | { |
| 1592 | nsp_hw_data *data = priv_data; | 1571 | nsp_hw_data *data = priv_data; |
| @@ -1697,11 +1676,6 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
| 1697 | } /* nsp_cs_config */ | 1676 | } /* nsp_cs_config */ |
| 1698 | 1677 | ||
| 1699 | 1678 | ||
| 1700 | /*====================================================================== | ||
| 1701 | After a card is removed, nsp_cs_release() will unregister the net | ||
| 1702 | device, and release the PCMCIA configuration. If the device is | ||
| 1703 | still open, this will be postponed until it is closed. | ||
| 1704 | ======================================================================*/ | ||
| 1705 | static void nsp_cs_release(struct pcmcia_device *link) | 1679 | static void nsp_cs_release(struct pcmcia_device *link) |
| 1706 | { | 1680 | { |
| 1707 | scsi_info_t *info = link->priv; | 1681 | scsi_info_t *info = link->priv; |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 5047224d2625..649ce543327b 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
| @@ -262,13 +262,6 @@ static const struct serial_quirk quirks[] = { | |||
| 262 | static int serial_config(struct pcmcia_device * link); | 262 | static int serial_config(struct pcmcia_device * link); |
| 263 | 263 | ||
| 264 | 264 | ||
| 265 | /*====================================================================== | ||
| 266 | |||
| 267 | After a card is removed, serial_remove() will unregister | ||
| 268 | the serial device(s), and release the PCMCIA configuration. | ||
| 269 | |||
| 270 | ======================================================================*/ | ||
| 271 | |||
| 272 | static void serial_remove(struct pcmcia_device *link) | 265 | static void serial_remove(struct pcmcia_device *link) |
| 273 | { | 266 | { |
| 274 | struct serial_info *info = link->priv; | 267 | struct serial_info *info = link->priv; |
| @@ -311,14 +304,6 @@ static int serial_resume(struct pcmcia_device *link) | |||
| 311 | return 0; | 304 | return 0; |
| 312 | } | 305 | } |
| 313 | 306 | ||
| 314 | /*====================================================================== | ||
| 315 | |||
| 316 | serial_attach() creates an "instance" of the driver, allocating | ||
| 317 | local data structures for one device. The device is registered | ||
| 318 | with Card Services. | ||
| 319 | |||
| 320 | ======================================================================*/ | ||
| 321 | |||
| 322 | static int serial_probe(struct pcmcia_device *link) | 307 | static int serial_probe(struct pcmcia_device *link) |
| 323 | { | 308 | { |
| 324 | struct serial_info *info; | 309 | struct serial_info *info; |
| @@ -339,15 +324,6 @@ static int serial_probe(struct pcmcia_device *link) | |||
| 339 | return serial_config(link); | 324 | return serial_config(link); |
| 340 | } | 325 | } |
| 341 | 326 | ||
| 342 | /*====================================================================== | ||
| 343 | |||
| 344 | This deletes a driver "instance". The device is de-registered | ||
| 345 | with Card Services. If it has been released, all local data | ||
| 346 | structures are freed. Otherwise, the structures will be freed | ||
| 347 | when the device is released. | ||
| 348 | |||
| 349 | ======================================================================*/ | ||
| 350 | |||
| 351 | static void serial_detach(struct pcmcia_device *link) | 327 | static void serial_detach(struct pcmcia_device *link) |
| 352 | { | 328 | { |
| 353 | struct serial_info *info = link->priv; | 329 | struct serial_info *info = link->priv; |
| @@ -631,14 +607,6 @@ static int serial_check_for_multi(struct pcmcia_device *p_dev, void *priv_data) | |||
| 631 | } | 607 | } |
| 632 | 608 | ||
| 633 | 609 | ||
| 634 | /*====================================================================== | ||
| 635 | |||
| 636 | serial_config() is scheduled to run after a CARD_INSERTION event | ||
| 637 | is received, to configure the PCMCIA socket, and to make the | ||
| 638 | serial device available to the system. | ||
| 639 | |||
| 640 | ======================================================================*/ | ||
| 641 | |||
| 642 | static int serial_config(struct pcmcia_device * link) | 610 | static int serial_config(struct pcmcia_device * link) |
| 643 | { | 611 | { |
| 644 | struct serial_info *info = link->priv; | 612 | struct serial_info *info = link->priv; |
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index a885cd7cfd7f..0345b4caba73 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c | |||
| @@ -736,11 +736,6 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) | |||
| 736 | if (!link->irq) | 736 | if (!link->irq) |
| 737 | goto failed; | 737 | goto failed; |
| 738 | 738 | ||
| 739 | /* | ||
| 740 | This actually configures the PCMCIA socket -- setting up | ||
| 741 | the I/O windows and the interrupt mapping, and putting the | ||
| 742 | card and host interface into "Memory and IO" mode. | ||
| 743 | */ | ||
| 744 | ret = pcmcia_enable_device(link); | 739 | ret = pcmcia_enable_device(link); |
| 745 | if (ret) | 740 | if (ret) |
| 746 | goto failed; | 741 | goto failed; |
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index def167eac1d8..0b32a2df7768 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c | |||
| @@ -114,40 +114,15 @@ static void das08_pcmcia_release(struct pcmcia_device *link); | |||
| 114 | static int das08_pcmcia_suspend(struct pcmcia_device *p_dev); | 114 | static int das08_pcmcia_suspend(struct pcmcia_device *p_dev); |
| 115 | static int das08_pcmcia_resume(struct pcmcia_device *p_dev); | 115 | static int das08_pcmcia_resume(struct pcmcia_device *p_dev); |
| 116 | 116 | ||
| 117 | /* | ||
| 118 | The attach() and detach() entry points are used to create and destroy | ||
| 119 | "instances" of the driver, where each instance represents everything | ||
| 120 | needed to manage one actual PCMCIA card. | ||
| 121 | */ | ||
| 122 | |||
| 123 | static int das08_pcmcia_attach(struct pcmcia_device *); | 117 | static int das08_pcmcia_attach(struct pcmcia_device *); |
| 124 | static void das08_pcmcia_detach(struct pcmcia_device *); | 118 | static void das08_pcmcia_detach(struct pcmcia_device *); |
| 125 | 119 | ||
| 126 | /* | ||
| 127 | You'll also need to prototype all the functions that will actually | ||
| 128 | be used to talk to your device. See 'memory_cs' for a good example | ||
| 129 | of a fully self-sufficient driver; the other drivers rely more or | ||
| 130 | less on other parts of the kernel. | ||
| 131 | */ | ||
| 132 | |||
| 133 | struct local_info_t { | 120 | struct local_info_t { |
| 134 | struct pcmcia_device *link; | 121 | struct pcmcia_device *link; |
| 135 | int stop; | 122 | int stop; |
| 136 | struct bus_operations *bus; | 123 | struct bus_operations *bus; |
| 137 | }; | 124 | }; |
| 138 | 125 | ||
| 139 | /*====================================================================== | ||
| 140 | |||
| 141 | das08_pcmcia_attach() creates an "instance" of the driver, allocating | ||
| 142 | local data structures for one device. The device is registered | ||
| 143 | with Card Services. | ||
| 144 | |||
| 145 | The dev_link structure is initialized, but we don't actually | ||
| 146 | configure the card at this point -- we wait until we receive a | ||
| 147 | card insertion event. | ||
| 148 | |||
| 149 | ======================================================================*/ | ||
| 150 | |||
| 151 | static int das08_pcmcia_attach(struct pcmcia_device *link) | 126 | static int das08_pcmcia_attach(struct pcmcia_device *link) |
| 152 | { | 127 | { |
| 153 | struct local_info_t *local; | 128 | struct local_info_t *local; |
| @@ -168,15 +143,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link) | |||
| 168 | return 0; | 143 | return 0; |
| 169 | } /* das08_pcmcia_attach */ | 144 | } /* das08_pcmcia_attach */ |
| 170 | 145 | ||
| 171 | /*====================================================================== | ||
| 172 | |||
| 173 | This deletes a driver "instance". The device is de-registered | ||
| 174 | with Card Services. If it has been released, all local data | ||
| 175 | structures are freed. Otherwise, the structures will be freed | ||
| 176 | when the device is released. | ||
| 177 | |||
| 178 | ======================================================================*/ | ||
| 179 | |||
| 180 | static void das08_pcmcia_detach(struct pcmcia_device *link) | 146 | static void das08_pcmcia_detach(struct pcmcia_device *link) |
| 181 | { | 147 | { |
| 182 | 148 | ||
| @@ -200,15 +166,6 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev, | |||
| 200 | return pcmcia_request_io(p_dev); | 166 | return pcmcia_request_io(p_dev); |
| 201 | } | 167 | } |
| 202 | 168 | ||
| 203 | |||
| 204 | /*====================================================================== | ||
| 205 | |||
| 206 | das08_pcmcia_config() is scheduled to run after a CARD_INSERTION event | ||
| 207 | is received, to configure the PCMCIA socket, and to make the | ||
| 208 | device available to the system. | ||
| 209 | |||
| 210 | ======================================================================*/ | ||
| 211 | |||
| 212 | static void das08_pcmcia_config(struct pcmcia_device *link) | 169 | static void das08_pcmcia_config(struct pcmcia_device *link) |
| 213 | { | 170 | { |
| 214 | int ret; | 171 | int ret; |
| @@ -226,11 +183,6 @@ static void das08_pcmcia_config(struct pcmcia_device *link) | |||
| 226 | if (!link->irq) | 183 | if (!link->irq) |
| 227 | goto failed; | 184 | goto failed; |
| 228 | 185 | ||
| 229 | /* | ||
| 230 | This actually configures the PCMCIA socket -- setting up | ||
| 231 | the I/O windows and the interrupt mapping, and putting the | ||
| 232 | card and host interface into "Memory and IO" mode. | ||
| 233 | */ | ||
| 234 | ret = pcmcia_enable_device(link); | 186 | ret = pcmcia_enable_device(link); |
| 235 | if (ret) | 187 | if (ret) |
| 236 | goto failed; | 188 | goto failed; |
| @@ -242,32 +194,12 @@ failed: | |||
| 242 | 194 | ||
| 243 | } /* das08_pcmcia_config */ | 195 | } /* das08_pcmcia_config */ |
| 244 | 196 | ||
| 245 | /*====================================================================== | ||
| 246 | |||
| 247 | After a card is removed, das08_pcmcia_release() will unregister the | ||
| 248 | device, and release the PCMCIA configuration. If the device is | ||
| 249 | still open, this will be postponed until it is closed. | ||
| 250 | |||
| 251 | ======================================================================*/ | ||
| 252 | |||
| 253 | static void das08_pcmcia_release(struct pcmcia_device *link) | 197 | static void das08_pcmcia_release(struct pcmcia_device *link) |
| 254 | { | 198 | { |
| 255 | dev_dbg(&link->dev, "das08_pcmcia_release\n"); | 199 | dev_dbg(&link->dev, "das08_pcmcia_release\n"); |
| 256 | pcmcia_disable_device(link); | 200 | pcmcia_disable_device(link); |
| 257 | } /* das08_pcmcia_release */ | 201 | } /* das08_pcmcia_release */ |
| 258 | 202 | ||
| 259 | /*====================================================================== | ||
| 260 | |||
| 261 | The card status event handler. Mostly, this schedules other | ||
| 262 | stuff to run after an event is received. | ||
| 263 | |||
| 264 | When a CARD_REMOVAL event is received, we immediately set a | ||
| 265 | private flag to block future accesses to this device. All the | ||
| 266 | functions that actually access the device should check this flag | ||
| 267 | to make sure the card is still present. | ||
| 268 | |||
| 269 | ======================================================================*/ | ||
| 270 | |||
| 271 | static int das08_pcmcia_suspend(struct pcmcia_device *link) | 203 | static int das08_pcmcia_suspend(struct pcmcia_device *link) |
| 272 | { | 204 | { |
| 273 | struct local_info_t *local = link->priv; | 205 | struct local_info_t *local = link->priv; |
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index 9cc8401765bd..fc772a8a55c6 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c | |||
| @@ -434,47 +434,20 @@ static int dio700_detach(struct comedi_device *dev) | |||
| 434 | return 0; | 434 | return 0; |
| 435 | }; | 435 | }; |
| 436 | 436 | ||
| 437 | /* PCMCIA crap -- watch your words, please! */ | ||
| 438 | |||
| 439 | static void dio700_config(struct pcmcia_device *link); | 437 | static void dio700_config(struct pcmcia_device *link); |
| 440 | static void dio700_release(struct pcmcia_device *link); | 438 | static void dio700_release(struct pcmcia_device *link); |
| 441 | static int dio700_cs_suspend(struct pcmcia_device *p_dev); | 439 | static int dio700_cs_suspend(struct pcmcia_device *p_dev); |
| 442 | static int dio700_cs_resume(struct pcmcia_device *p_dev); | 440 | static int dio700_cs_resume(struct pcmcia_device *p_dev); |
| 443 | 441 | ||
| 444 | /* | ||
| 445 | The attach() and detach() entry points are used to create and destroy | ||
| 446 | "instances" of the driver, where each instance represents everything | ||
| 447 | needed to manage one actual PCMCIA card. | ||
| 448 | */ | ||
| 449 | |||
| 450 | static int dio700_cs_attach(struct pcmcia_device *); | 442 | static int dio700_cs_attach(struct pcmcia_device *); |
| 451 | static void dio700_cs_detach(struct pcmcia_device *); | 443 | static void dio700_cs_detach(struct pcmcia_device *); |
| 452 | 444 | ||
| 453 | /* | ||
| 454 | You'll also need to prototype all the functions that will actually | ||
| 455 | be used to talk to your device. See 'memory_cs' for a good example | ||
| 456 | of a fully self-sufficient driver; the other drivers rely more or | ||
| 457 | less on other parts of the kernel. | ||
| 458 | */ | ||
| 459 | |||
| 460 | struct local_info_t { | 445 | struct local_info_t { |
| 461 | struct pcmcia_device *link; | 446 | struct pcmcia_device *link; |
| 462 | int stop; | 447 | int stop; |
| 463 | struct bus_operations *bus; | 448 | struct bus_operations *bus; |
| 464 | }; | 449 | }; |
| 465 | 450 | ||
| 466 | /*====================================================================== | ||
| 467 | |||
| 468 | dio700_cs_attach() creates an "instance" of the driver, allocating | ||
| 469 | local data structures for one device. The device is registered | ||
| 470 | with Card Services. | ||
| 471 | |||
| 472 | The dev_link structure is initialized, but we don't actually | ||
| 473 | configure the card at this point -- we wait until we receive a | ||
| 474 | card insertion event. | ||
| 475 | |||
| 476 | ======================================================================*/ | ||
| 477 | |||
| 478 | static int dio700_cs_attach(struct pcmcia_device *link) | 451 | static int dio700_cs_attach(struct pcmcia_device *link) |
| 479 | { | 452 | { |
| 480 | struct local_info_t *local; | 453 | struct local_info_t *local; |
| @@ -497,15 +470,6 @@ static int dio700_cs_attach(struct pcmcia_device *link) | |||
| 497 | return 0; | 470 | return 0; |
| 498 | } /* dio700_cs_attach */ | 471 | } /* dio700_cs_attach */ |
| 499 | 472 | ||
| 500 | /*====================================================================== | ||
| 501 | |||
| 502 | This deletes a driver "instance". The device is de-registered | ||
| 503 | with Card Services. If it has been released, all local data | ||
| 504 | structures are freed. Otherwise, the structures will be freed | ||
| 505 | when the device is released. | ||
| 506 | |||
| 507 | ======================================================================*/ | ||
| 508 | |||
| 509 | static void dio700_cs_detach(struct pcmcia_device *link) | 473 | static void dio700_cs_detach(struct pcmcia_device *link) |
| 510 | { | 474 | { |
| 511 | 475 | ||
| @@ -521,14 +485,6 @@ static void dio700_cs_detach(struct pcmcia_device *link) | |||
| 521 | 485 | ||
| 522 | } /* dio700_cs_detach */ | 486 | } /* dio700_cs_detach */ |
| 523 | 487 | ||
| 524 | /*====================================================================== | ||
| 525 | |||
| 526 | dio700_config() is scheduled to run after a CARD_INSERTION event | ||
| 527 | is received, to configure the PCMCIA socket, and to make the | ||
| 528 | device available to the system. | ||
| 529 | |||
| 530 | ======================================================================*/ | ||
| 531 | |||
| 532 | static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev, | 488 | static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev, |
| 533 | void *priv_data) | 489 | void *priv_data) |
| 534 | { | 490 | { |
| @@ -559,11 +515,6 @@ static void dio700_config(struct pcmcia_device *link) | |||
| 559 | if (!link->irq) | 515 | if (!link->irq) |
| 560 | goto failed; | 516 | goto failed; |
| 561 | 517 | ||
| 562 | /* | ||
| 563 | This actually configures the PCMCIA socket -- setting up | ||
| 564 | the I/O windows and the interrupt mapping, and putting the | ||
| 565 | card and host interface into "Memory and IO" mode. | ||
| 566 | */ | ||
| 567 | ret = pcmcia_enable_device(link); | 518 | ret = pcmcia_enable_device(link); |
| 568 | if (ret != 0) | 519 | if (ret != 0) |
| 569 | goto failed; | 520 | goto failed; |
| @@ -583,18 +534,6 @@ static void dio700_release(struct pcmcia_device *link) | |||
| 583 | pcmcia_disable_device(link); | 534 | pcmcia_disable_device(link); |
| 584 | } /* dio700_release */ | 535 | } /* dio700_release */ |
| 585 | 536 | ||
| 586 | /*====================================================================== | ||
| 587 | |||
| 588 | The card status event handler. Mostly, this schedules other | ||
| 589 | stuff to run after an event is received. | ||
| 590 | |||
| 591 | When a CARD_REMOVAL event is received, we immediately set a | ||
| 592 | private flag to block future accesses to this device. All the | ||
| 593 | functions that actually access the device should check this flag | ||
| 594 | to make sure the card is still present. | ||
| 595 | |||
| 596 | ======================================================================*/ | ||
| 597 | |||
| 598 | static int dio700_cs_suspend(struct pcmcia_device *link) | 537 | static int dio700_cs_suspend(struct pcmcia_device *link) |
| 599 | { | 538 | { |
| 600 | struct local_info_t *local = link->priv; | 539 | struct local_info_t *local = link->priv; |
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index b3f7c66e25c2..c9c28584db67 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c | |||
| @@ -186,47 +186,20 @@ static int dio24_detach(struct comedi_device *dev) | |||
| 186 | return 0; | 186 | return 0; |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| 189 | /* PCMCIA crap -- watch your words! */ | ||
| 190 | |||
| 191 | static void dio24_config(struct pcmcia_device *link); | 189 | static void dio24_config(struct pcmcia_device *link); |
| 192 | static void dio24_release(struct pcmcia_device *link); | 190 | static void dio24_release(struct pcmcia_device *link); |
| 193 | static int dio24_cs_suspend(struct pcmcia_device *p_dev); | 191 | static int dio24_cs_suspend(struct pcmcia_device *p_dev); |
| 194 | static int dio24_cs_resume(struct pcmcia_device *p_dev); | 192 | static int dio24_cs_resume(struct pcmcia_device *p_dev); |
| 195 | 193 | ||
| 196 | /* | ||
| 197 | The attach() and detach() entry points are used to create and destroy | ||
| 198 | "instances" of the driver, where each instance represents everything | ||
| 199 | needed to manage one actual PCMCIA card. | ||
| 200 | */ | ||
| 201 | |||
| 202 | static int dio24_cs_attach(struct pcmcia_device *); | 194 | static int dio24_cs_attach(struct pcmcia_device *); |
| 203 | static void dio24_cs_detach(struct pcmcia_device *); | 195 | static void dio24_cs_detach(struct pcmcia_device *); |
| 204 | 196 | ||
| 205 | /* | ||
| 206 | You'll also need to prototype all the functions that will actually | ||
| 207 | be used to talk to your device. See 'memory_cs' for a good example | ||
| 208 | of a fully self-sufficient driver; the other drivers rely more or | ||
| 209 | less on other parts of the kernel. | ||
| 210 | */ | ||
| 211 | |||
| 212 | struct local_info_t { | 197 | struct local_info_t { |
| 213 | struct pcmcia_device *link; | 198 | struct pcmcia_device *link; |
| 214 | int stop; | 199 | int stop; |
| 215 | struct bus_operations *bus; | 200 | struct bus_operations *bus; |
| 216 | }; | 201 | }; |
| 217 | 202 | ||
| 218 | /*====================================================================== | ||
| 219 | |||
| 220 | dio24_cs_attach() creates an "instance" of the driver, allocating | ||
| 221 | local data structures for one device. The device is registered | ||
| 222 | with Card Services. | ||
| 223 | |||
| 224 | The dev_link structure is initialized, but we don't actually | ||
| 225 | configure the card at this point -- we wait until we receive a | ||
| 226 | card insertion event. | ||
| 227 | |||
| 228 | ======================================================================*/ | ||
| 229 | |||
| 230 | static int dio24_cs_attach(struct pcmcia_device *link) | 203 | static int dio24_cs_attach(struct pcmcia_device *link) |
| 231 | { | 204 | { |
| 232 | struct local_info_t *local; | 205 | struct local_info_t *local; |
| @@ -249,15 +222,6 @@ static int dio24_cs_attach(struct pcmcia_device *link) | |||
| 249 | return 0; | 222 | return 0; |
| 250 | } /* dio24_cs_attach */ | 223 | } /* dio24_cs_attach */ |
| 251 | 224 | ||
| 252 | /*====================================================================== | ||
| 253 | |||
| 254 | This deletes a driver "instance". The device is de-registered | ||
| 255 | with Card Services. If it has been released, all local data | ||
| 256 | structures are freed. Otherwise, the structures will be freed | ||
| 257 | when the device is released. | ||
| 258 | |||
| 259 | ======================================================================*/ | ||
| 260 | |||
| 261 | static void dio24_cs_detach(struct pcmcia_device *link) | 225 | static void dio24_cs_detach(struct pcmcia_device *link) |
| 262 | { | 226 | { |
| 263 | 227 | ||
| @@ -273,14 +237,6 @@ static void dio24_cs_detach(struct pcmcia_device *link) | |||
| 273 | 237 | ||
| 274 | } /* dio24_cs_detach */ | 238 | } /* dio24_cs_detach */ |
| 275 | 239 | ||
| 276 | /*====================================================================== | ||
| 277 | |||
| 278 | dio24_config() is scheduled to run after a CARD_INSERTION event | ||
| 279 | is received, to configure the PCMCIA socket, and to make the | ||
| 280 | device available to the system. | ||
| 281 | |||
| 282 | ======================================================================*/ | ||
| 283 | |||
| 284 | static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev, | 240 | static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev, |
| 285 | void *priv_data) | 241 | void *priv_data) |
| 286 | { | 242 | { |
| @@ -310,11 +266,6 @@ static void dio24_config(struct pcmcia_device *link) | |||
| 310 | if (!link->irq) | 266 | if (!link->irq) |
| 311 | goto failed; | 267 | goto failed; |
| 312 | 268 | ||
| 313 | /* | ||
| 314 | This actually configures the PCMCIA socket -- setting up | ||
| 315 | the I/O windows and the interrupt mapping, and putting the | ||
| 316 | card and host interface into "Memory and IO" mode. | ||
| 317 | */ | ||
| 318 | ret = pcmcia_enable_device(link); | 269 | ret = pcmcia_enable_device(link); |
| 319 | if (ret) | 270 | if (ret) |
| 320 | goto failed; | 271 | goto failed; |
| @@ -334,18 +285,6 @@ static void dio24_release(struct pcmcia_device *link) | |||
| 334 | pcmcia_disable_device(link); | 285 | pcmcia_disable_device(link); |
| 335 | } /* dio24_release */ | 286 | } /* dio24_release */ |
| 336 | 287 | ||
| 337 | /*====================================================================== | ||
| 338 | |||
| 339 | The card status event handler. Mostly, this schedules other | ||
| 340 | stuff to run after an event is received. | ||
| 341 | |||
| 342 | When a CARD_REMOVAL event is received, we immediately set a | ||
| 343 | private flag to block future accesses to this device. All the | ||
| 344 | functions that actually access the device should check this flag | ||
| 345 | to make sure the card is still present. | ||
| 346 | |||
| 347 | ======================================================================*/ | ||
| 348 | |||
| 349 | static int dio24_cs_suspend(struct pcmcia_device *link) | 288 | static int dio24_cs_suspend(struct pcmcia_device *link) |
| 350 | { | 289 | { |
| 351 | struct local_info_t *local = link->priv; | 290 | struct local_info_t *local = link->priv; |
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 6b7c5d043b0a..6facbc8bf776 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c | |||
| @@ -152,59 +152,20 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 152 | return labpc_common_attach(dev, iobase, irq, 0); | 152 | return labpc_common_attach(dev, iobase, irq, 0); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | /*====================================================================*/ | ||
| 156 | |||
| 157 | /* | ||
| 158 | The event() function is this driver's Card Services event handler. | ||
| 159 | It will be called by Card Services when an appropriate card status | ||
| 160 | event is received. The config() and release() entry points are | ||
| 161 | used to configure or release a socket, in response to card | ||
| 162 | insertion and ejection events. They are invoked from the dummy | ||
| 163 | event handler. | ||
| 164 | |||
| 165 | Kernel version 2.6.16 upwards uses suspend() and resume() functions | ||
| 166 | instead of an event() function. | ||
| 167 | */ | ||
| 168 | |||
| 169 | static void labpc_config(struct pcmcia_device *link); | 155 | static void labpc_config(struct pcmcia_device *link); |
| 170 | static void labpc_release(struct pcmcia_device *link); | 156 | static void labpc_release(struct pcmcia_device *link); |
| 171 | static int labpc_cs_suspend(struct pcmcia_device *p_dev); | 157 | static int labpc_cs_suspend(struct pcmcia_device *p_dev); |
| 172 | static int labpc_cs_resume(struct pcmcia_device *p_dev); | 158 | static int labpc_cs_resume(struct pcmcia_device *p_dev); |
| 173 | 159 | ||
| 174 | /* | ||
| 175 | The attach() and detach() entry points are used to create and destroy | ||
| 176 | "instances" of the driver, where each instance represents everything | ||
| 177 | needed to manage one actual PCMCIA card. | ||
| 178 | */ | ||
| 179 | |||
| 180 | static int labpc_cs_attach(struct pcmcia_device *); | 160 | static int labpc_cs_attach(struct pcmcia_device *); |
| 181 | static void labpc_cs_detach(struct pcmcia_device *); | 161 | static void labpc_cs_detach(struct pcmcia_device *); |
| 182 | 162 | ||
| 183 | /* | ||
| 184 | You'll also need to prototype all the functions that will actually | ||
| 185 | be used to talk to your device. See 'memory_cs' for a good example | ||
| 186 | of a fully self-sufficient driver; the other drivers rely more or | ||
| 187 | less on other parts of the kernel. | ||
| 188 | */ | ||
| 189 | |||
| 190 | struct local_info_t { | 163 | struct local_info_t { |
| 191 | struct pcmcia_device *link; | 164 | struct pcmcia_device *link; |
| 192 | int stop; | 165 | int stop; |
| 193 | struct bus_operations *bus; | 166 | struct bus_operations *bus; |
| 194 | }; | 167 | }; |
| 195 | 168 | ||
| 196 | /*====================================================================== | ||
| 197 | |||
| 198 | labpc_cs_attach() creates an "instance" of the driver, allocating | ||
| 199 | local data structures for one device. The device is registered | ||
| 200 | with Card Services. | ||
| 201 | |||
| 202 | The dev_link structure is initialized, but we don't actually | ||
| 203 | configure the card at this point -- we wait until we receive a | ||
| 204 | card insertion event. | ||
| 205 | |||
| 206 | ======================================================================*/ | ||
| 207 | |||
| 208 | static int labpc_cs_attach(struct pcmcia_device *link) | 169 | static int labpc_cs_attach(struct pcmcia_device *link) |
| 209 | { | 170 | { |
| 210 | struct local_info_t *local; | 171 | struct local_info_t *local; |
| @@ -225,15 +186,6 @@ static int labpc_cs_attach(struct pcmcia_device *link) | |||
| 225 | return 0; | 186 | return 0; |
| 226 | } /* labpc_cs_attach */ | 187 | } /* labpc_cs_attach */ |
| 227 | 188 | ||
| 228 | /*====================================================================== | ||
| 229 | |||
| 230 | This deletes a driver "instance". The device is de-registered | ||
| 231 | with Card Services. If it has been released, all local data | ||
| 232 | structures are freed. Otherwise, the structures will be freed | ||
| 233 | when the device is released. | ||
| 234 | |||
| 235 | ======================================================================*/ | ||
| 236 | |||
| 237 | static void labpc_cs_detach(struct pcmcia_device *link) | 189 | static void labpc_cs_detach(struct pcmcia_device *link) |
| 238 | { | 190 | { |
| 239 | dev_dbg(&link->dev, "labpc_cs_detach\n"); | 191 | dev_dbg(&link->dev, "labpc_cs_detach\n"); |
| @@ -252,14 +204,6 @@ static void labpc_cs_detach(struct pcmcia_device *link) | |||
| 252 | 204 | ||
| 253 | } /* labpc_cs_detach */ | 205 | } /* labpc_cs_detach */ |
| 254 | 206 | ||
| 255 | /*====================================================================== | ||
| 256 | |||
| 257 | labpc_config() is scheduled to run after a CARD_INSERTION event | ||
| 258 | is received, to configure the PCMCIA socket, and to make the | ||
| 259 | device available to the system. | ||
| 260 | |||
| 261 | ======================================================================*/ | ||
| 262 | |||
| 263 | static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, | 207 | static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, |
| 264 | void *priv_data) | 208 | void *priv_data) |
| 265 | { | 209 | { |
| @@ -288,11 +232,6 @@ static void labpc_config(struct pcmcia_device *link) | |||
| 288 | if (!link->irq) | 232 | if (!link->irq) |
| 289 | goto failed; | 233 | goto failed; |
| 290 | 234 | ||
| 291 | /* | ||
| 292 | This actually configures the PCMCIA socket -- setting up | ||
| 293 | the I/O windows and the interrupt mapping, and putting the | ||
| 294 | card and host interface into "Memory and IO" mode. | ||
| 295 | */ | ||
| 296 | ret = pcmcia_enable_device(link); | 235 | ret = pcmcia_enable_device(link); |
| 297 | if (ret) | 236 | if (ret) |
| 298 | goto failed; | 237 | goto failed; |
| @@ -311,18 +250,6 @@ static void labpc_release(struct pcmcia_device *link) | |||
| 311 | pcmcia_disable_device(link); | 250 | pcmcia_disable_device(link); |
| 312 | } /* labpc_release */ | 251 | } /* labpc_release */ |
| 313 | 252 | ||
| 314 | /*====================================================================== | ||
| 315 | |||
| 316 | The card status event handler. Mostly, this schedules other | ||
| 317 | stuff to run after an event is received. | ||
| 318 | |||
| 319 | When a CARD_REMOVAL event is received, we immediately set a | ||
| 320 | private flag to block future accesses to this device. All the | ||
| 321 | functions that actually access the device should check this flag | ||
| 322 | to make sure the card is still present. | ||
| 323 | |||
| 324 | ======================================================================*/ | ||
| 325 | |||
| 326 | static int labpc_cs_suspend(struct pcmcia_device *link) | 253 | static int labpc_cs_suspend(struct pcmcia_device *link) |
| 327 | { | 254 | { |
| 328 | struct local_info_t *local = link->priv; | 255 | struct local_info_t *local = link->priv; |
| @@ -340,8 +267,6 @@ static int labpc_cs_resume(struct pcmcia_device *link) | |||
| 340 | return 0; | 267 | return 0; |
| 341 | } /* labpc_cs_resume */ | 268 | } /* labpc_cs_resume */ |
| 342 | 269 | ||
| 343 | /*====================================================================*/ | ||
| 344 | |||
| 345 | static struct pcmcia_device_id labpc_cs_ids[] = { | 270 | static struct pcmcia_device_id labpc_cs_ids[] = { |
| 346 | /* N.B. These IDs should match those in labpc_cs_boards (ni_labpc.c) */ | 271 | /* N.B. These IDs should match those in labpc_cs_boards (ni_labpc.c) */ |
| 347 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0103), /* daqcard-1200 */ | 272 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0103), /* daqcard-1200 */ |
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 32fecf57868d..ebba9bb47777 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c | |||
| @@ -968,43 +968,14 @@ static int daqp_detach(struct comedi_device *dev) | |||
| 968 | 968 | ||
| 969 | ======================================================================*/ | 969 | ======================================================================*/ |
| 970 | 970 | ||
| 971 | /* | ||
| 972 | The event() function is this driver's Card Services event handler. | ||
| 973 | It will be called by Card Services when an appropriate card status | ||
| 974 | event is received. The config() and release() entry points are | ||
| 975 | used to configure or release a socket, in response to card | ||
| 976 | insertion and ejection events. | ||
| 977 | |||
| 978 | Kernel version 2.6.16 upwards uses suspend() and resume() functions | ||
| 979 | instead of an event() function. | ||
| 980 | */ | ||
| 981 | |||
| 982 | static void daqp_cs_config(struct pcmcia_device *link); | 971 | static void daqp_cs_config(struct pcmcia_device *link); |
| 983 | static void daqp_cs_release(struct pcmcia_device *link); | 972 | static void daqp_cs_release(struct pcmcia_device *link); |
| 984 | static int daqp_cs_suspend(struct pcmcia_device *p_dev); | 973 | static int daqp_cs_suspend(struct pcmcia_device *p_dev); |
| 985 | static int daqp_cs_resume(struct pcmcia_device *p_dev); | 974 | static int daqp_cs_resume(struct pcmcia_device *p_dev); |
| 986 | 975 | ||
| 987 | /* | ||
| 988 | The attach() and detach() entry points are used to create and destroy | ||
| 989 | "instances" of the driver, where each instance represents everything | ||
| 990 | needed to manage one actual PCMCIA card. | ||
| 991 | */ | ||
| 992 | |||
| 993 | static int daqp_cs_attach(struct pcmcia_device *); | 976 | static int daqp_cs_attach(struct pcmcia_device *); |
| 994 | static void daqp_cs_detach(struct pcmcia_device *); | 977 | static void daqp_cs_detach(struct pcmcia_device *); |
| 995 | 978 | ||
| 996 | /*====================================================================== | ||
| 997 | |||
| 998 | daqp_cs_attach() creates an "instance" of the driver, allocating | ||
| 999 | local data structures for one device. The device is registered | ||
| 1000 | with Card Services. | ||
| 1001 | |||
| 1002 | The dev_link structure is initialized, but we don't actually | ||
| 1003 | configure the card at this point -- we wait until we receive a | ||
| 1004 | card insertion event. | ||
| 1005 | |||
| 1006 | ======================================================================*/ | ||
| 1007 | |||
| 1008 | static int daqp_cs_attach(struct pcmcia_device *link) | 979 | static int daqp_cs_attach(struct pcmcia_device *link) |
| 1009 | { | 980 | { |
| 1010 | struct local_info_t *local; | 981 | struct local_info_t *local; |
| @@ -1035,15 +1006,6 @@ static int daqp_cs_attach(struct pcmcia_device *link) | |||
| 1035 | return 0; | 1006 | return 0; |
| 1036 | } /* daqp_cs_attach */ | 1007 | } /* daqp_cs_attach */ |
| 1037 | 1008 | ||
| 1038 | /*====================================================================== | ||
| 1039 | |||
| 1040 | This deletes a driver "instance". The device is de-registered | ||
| 1041 | with Card Services. If it has been released, all local data | ||
| 1042 | structures are freed. Otherwise, the structures will be freed | ||
| 1043 | when the device is released. | ||
| 1044 | |||
| 1045 | ======================================================================*/ | ||
| 1046 | |||
| 1047 | static void daqp_cs_detach(struct pcmcia_device *link) | 1009 | static void daqp_cs_detach(struct pcmcia_device *link) |
| 1048 | { | 1010 | { |
| 1049 | struct local_info_t *dev = link->priv; | 1011 | struct local_info_t *dev = link->priv; |
| @@ -1059,15 +1021,6 @@ static void daqp_cs_detach(struct pcmcia_device *link) | |||
| 1059 | 1021 | ||
| 1060 | } /* daqp_cs_detach */ | 1022 | } /* daqp_cs_detach */ |
| 1061 | 1023 | ||
| 1062 | /*====================================================================== | ||
| 1063 | |||
| 1064 | daqp_cs_config() is scheduled to run after a CARD_INSERTION event | ||
| 1065 | is received, to configure the PCMCIA socket, and to make the | ||
| 1066 | device available to the system. | ||
| 1067 | |||
| 1068 | ======================================================================*/ | ||
| 1069 | |||
| 1070 | |||
| 1071 | static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev, void *priv_data) | 1024 | static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev, void *priv_data) |
| 1072 | { | 1025 | { |
| 1073 | if (p_dev->config_index == 0) | 1026 | if (p_dev->config_index == 0) |
| @@ -1094,11 +1047,6 @@ static void daqp_cs_config(struct pcmcia_device *link) | |||
| 1094 | if (ret) | 1047 | if (ret) |
| 1095 | goto failed; | 1048 | goto failed; |
| 1096 | 1049 | ||
| 1097 | /* | ||
| 1098 | This actually configures the PCMCIA socket -- setting up | ||
| 1099 | the I/O windows and the interrupt mapping, and putting the | ||
| 1100 | card and host interface into "Memory and IO" mode. | ||
| 1101 | */ | ||
| 1102 | ret = pcmcia_enable_device(link); | 1050 | ret = pcmcia_enable_device(link); |
| 1103 | if (ret) | 1051 | if (ret) |
| 1104 | goto failed; | 1052 | goto failed; |
| @@ -1117,18 +1065,6 @@ static void daqp_cs_release(struct pcmcia_device *link) | |||
| 1117 | pcmcia_disable_device(link); | 1065 | pcmcia_disable_device(link); |
| 1118 | } /* daqp_cs_release */ | 1066 | } /* daqp_cs_release */ |
| 1119 | 1067 | ||
| 1120 | /*====================================================================== | ||
| 1121 | |||
| 1122 | The card status event handler. Mostly, this schedules other | ||
| 1123 | stuff to run after an event is received. | ||
| 1124 | |||
| 1125 | When a CARD_REMOVAL event is received, we immediately set a | ||
| 1126 | private flag to block future accesses to this device. All the | ||
| 1127 | functions that actually access the device should check this flag | ||
| 1128 | to make sure the card is still present. | ||
| 1129 | |||
| 1130 | ======================================================================*/ | ||
| 1131 | |||
| 1132 | static int daqp_cs_suspend(struct pcmcia_device *link) | 1068 | static int daqp_cs_suspend(struct pcmcia_device *link) |
| 1133 | { | 1069 | { |
| 1134 | struct local_info_t *local = link->priv; | 1070 | struct local_info_t *local = link->priv; |
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c index aa3cc516fe18..6555891e149c 100644 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c | |||
| @@ -163,27 +163,6 @@ static int wl_adapter_attach(struct pcmcia_device *link) | |||
| 163 | 163 | ||
| 164 | 164 | ||
| 165 | 165 | ||
| 166 | /******************************************************************************* | ||
| 167 | * wl_adapter_detach() | ||
| 168 | ******************************************************************************* | ||
| 169 | * | ||
| 170 | * DESCRIPTION: | ||
| 171 | * | ||
| 172 | * This deletes a driver "instance". The device is de-registered with Card | ||
| 173 | * Services. If it has been released, then the net device is unregistered, and | ||
| 174 | * all local data structures are freed. Otherwise, the structures will be | ||
| 175 | * freed when the device is released. | ||
| 176 | * | ||
| 177 | * PARAMETERS: | ||
| 178 | * | ||
| 179 | * link - pointer to the dev_link_t structure representing the device to | ||
| 180 | * detach | ||
| 181 | * | ||
| 182 | * RETURNS: | ||
| 183 | * | ||
| 184 | * N/A | ||
| 185 | * | ||
| 186 | ******************************************************************************/ | ||
| 187 | static void wl_adapter_detach(struct pcmcia_device *link) | 166 | static void wl_adapter_detach(struct pcmcia_device *link) |
| 188 | { | 167 | { |
| 189 | struct net_device *dev = link->priv; | 168 | struct net_device *dev = link->priv; |
| @@ -207,26 +186,6 @@ static void wl_adapter_detach(struct pcmcia_device *link) | |||
| 207 | /*============================================================================*/ | 186 | /*============================================================================*/ |
| 208 | 187 | ||
| 209 | 188 | ||
| 210 | /******************************************************************************* | ||
| 211 | * wl_adapter_release() | ||
| 212 | ******************************************************************************* | ||
| 213 | * | ||
| 214 | * DESCRIPTION: | ||
| 215 | * | ||
| 216 | * After a card is removed, this routine will release the PCMCIA | ||
| 217 | * configuration. If the device is still open, this will be postponed until it | ||
| 218 | * is closed. | ||
| 219 | * | ||
| 220 | * PARAMETERS: | ||
| 221 | * | ||
| 222 | * arg - a u_long representing a pointer to a dev_link_t structure for the | ||
| 223 | * device to be released. | ||
| 224 | * | ||
| 225 | * RETURNS: | ||
| 226 | * | ||
| 227 | * N/A | ||
| 228 | * | ||
| 229 | ******************************************************************************/ | ||
| 230 | void wl_adapter_release(struct pcmcia_device *link) | 189 | void wl_adapter_release(struct pcmcia_device *link) |
| 231 | { | 190 | { |
| 232 | DBG_FUNC("wl_adapter_release"); | 191 | DBG_FUNC("wl_adapter_release"); |
| @@ -266,26 +225,6 @@ static int wl_adapter_resume(struct pcmcia_device *link) | |||
| 266 | return 0; | 225 | return 0; |
| 267 | } /* wl_adapter_resume */ | 226 | } /* wl_adapter_resume */ |
| 268 | 227 | ||
| 269 | /******************************************************************************* | ||
| 270 | * wl_adapter_insert() | ||
| 271 | ******************************************************************************* | ||
| 272 | * | ||
| 273 | * DESCRIPTION: | ||
| 274 | * | ||
| 275 | * wl_adapter_insert() is scheduled to run after a CARD_INSERTION event is | ||
| 276 | * received, to configure the PCMCIA socket, and to make the ethernet device | ||
| 277 | * available to the system. | ||
| 278 | * | ||
| 279 | * PARAMETERS: | ||
| 280 | * | ||
| 281 | * link - pointer to the dev_link_t structure representing the device to | ||
| 282 | * insert | ||
| 283 | * | ||
| 284 | * RETURNS: | ||
| 285 | * | ||
| 286 | * N/A | ||
| 287 | * | ||
| 288 | ******************************************************************************/ | ||
| 289 | void wl_adapter_insert(struct pcmcia_device *link) | 228 | void wl_adapter_insert(struct pcmcia_device *link) |
| 290 | { | 229 | { |
| 291 | struct net_device *dev; | 230 | struct net_device *dev; |
diff --git a/drivers/staging/wlags49_h2/wl_main.c b/drivers/staging/wlags49_h2/wl_main.c index 88d0d472142f..8e3536acbf46 100644 --- a/drivers/staging/wlags49_h2/wl_main.c +++ b/drivers/staging/wlags49_h2/wl_main.c | |||
| @@ -414,25 +414,6 @@ extern memimage fw_image; // firmware image to be downloaded | |||
| 414 | #endif /* HCF_STA */ | 414 | #endif /* HCF_STA */ |
| 415 | 415 | ||
| 416 | 416 | ||
| 417 | /******************************************************************************* | ||
| 418 | * wl_insert() | ||
| 419 | ******************************************************************************* | ||
| 420 | * | ||
| 421 | * DESCRIPTION: | ||
| 422 | * | ||
| 423 | * wl_insert() is scheduled to run after a CARD_INSERTION event is | ||
| 424 | * received, to configure the PCMCIA socket, and to make the ethernet device | ||
| 425 | * available to the system. | ||
| 426 | * | ||
| 427 | * PARAMETERS: | ||
| 428 | * | ||
| 429 | * dev - a pointer to the net_device struct of the wireless device | ||
| 430 | * | ||
| 431 | * RETURNS: | ||
| 432 | * | ||
| 433 | * TRUE or FALSE | ||
| 434 | * | ||
| 435 | ******************************************************************************/ | ||
| 436 | int wl_insert( struct net_device *dev ) | 417 | int wl_insert( struct net_device *dev ) |
| 437 | { | 418 | { |
| 438 | int result = 0; | 419 | int result = 0; |
