aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-08-15 02:38:38 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 11:20:25 -0400
commit2262054e74b4b26ed56a8535c1259f6c6c2862a4 (patch)
treefbcd0aa7879408b9676c2df6c7514e5d7428880a /drivers/net
parent06b3a1d12f41b592972643f8b84015d6c03dc576 (diff)
pcmcia: remove obsolete and wrong comments
What's worse than no comment? A wrong comment. Several PCMCIA device drivers contained the same comments, which were based on how the PCMCIA subsystem worked in the old days of 2.4., and which were originally part of a "dummy_cs" driver. These comments no longer matched at all what is happening now, and therefore should be removed. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/pcmcia/3c574_cs.c23
-rw-r--r--drivers/net/pcmcia/3c589_cs.c35
-rw-r--r--drivers/net/pcmcia/axnet_cs.c33
-rw-r--r--drivers/net/pcmcia/com20020_cs.c33
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c33
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c28
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c42
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c33
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c53
-rw-r--r--drivers/net/wireless/airo_cs.c71
-rw-r--r--drivers/net/wireless/atmel_cs.c69
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c8
-rw-r--r--drivers/net/wireless/libertas/if_cs.c30
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c44
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c44
-rw-r--r--drivers/net/wireless/ray_cs.c35
-rw-r--r--drivers/net/wireless/wl3501_cs.c35
17 files changed, 3 insertions, 646 deletions
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
301static void tc574_detach(struct pcmcia_device *link) 292static 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
320static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 305static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
321 306
322static int tc574_config(struct pcmcia_device *link) 307static 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
472static void tc574_release(struct pcmcia_device *link) 451static 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
176static void tc589_detach(struct pcmcia_device *p_dev); 176static 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
186static const struct net_device_ops el3_netdev_ops = { 178static 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
238static void tc589_detach(struct pcmcia_device *link) 221static 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
259static int tc589_config(struct pcmcia_device *link) 234static 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
361static void tc589_release(struct pcmcia_device *link) 328static 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
150static int axnet_probe(struct pcmcia_device *link) 142static 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
187static void axnet_detach(struct pcmcia_device *link) 170static 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
257static int try_io_port(struct pcmcia_device *link) 232static 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
403static void axnet_release(struct pcmcia_device *link) 370static 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
133static int com20020_probe(struct pcmcia_device *p_dev) 125static 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
184static void com20020_detach(struct pcmcia_device *link) 167static 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
230static int com20020_config(struct pcmcia_device *link) 205static 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
325static void com20020_release(struct pcmcia_device *link) 292static 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
132static int __devinit ibmtr_attach(struct pcmcia_device *link) 124static 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
173static void ibmtr_detach(struct pcmcia_device *link) 156static 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
205static int __devinit ibmtr_config(struct pcmcia_device *link) 180static 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
308static void ibmtr_release(struct pcmcia_device *link) 275static 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/* ----------------------------------------------------------------------------
438nmclan_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
444static int nmclan_probe(struct pcmcia_device *link) 437static 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/* ----------------------------------------------------------------------------
476nmclan_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
483static void nmclan_detach(struct pcmcia_device *link) 468static 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/* ----------------------------------------------------------------------------
627nmclan_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
633static int nmclan_config(struct pcmcia_device *link) 611static 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/* ----------------------------------------------------------------------------
714nmclan_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---------------------------------------------------------------------------- */
719static void nmclan_release(struct pcmcia_device *link) 691static 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
248static int pcnet_probe(struct pcmcia_device *link) 240static 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
278static void pcnet_detach(struct pcmcia_device *link) 261static 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
472static int try_io_port(struct pcmcia_device *link) 447static 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
676static void pcnet_release(struct pcmcia_device *link) 643static 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
697static int pcnet_suspend(struct pcmcia_device *link) 655static 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
310static int smc91c92_probe(struct pcmcia_device *link) 302static 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
350static void smc91c92_detach(struct pcmcia_device *link) 333static 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
830static int smc91c92_config(struct pcmcia_device *link) 805static 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
988static void smc91c92_release(struct pcmcia_device *link) 955static 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);
266static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, 266static 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
277static int has_ce2_string(struct pcmcia_device * link); 269static int has_ce2_string(struct pcmcia_device * link);
278static int xirc2ps_config(struct pcmcia_device * link); 270static int xirc2ps_config(struct pcmcia_device * link);
279static void xirc2ps_release(struct pcmcia_device * link); 271static 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
287static void xirc2ps_detach(struct pcmcia_device *p_dev); 272static 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
296static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id); 274static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id);
297 275
298typedef struct local_info_t { 276typedef 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
513static int 481static int
514xirc2ps_probe(struct pcmcia_device *link) 482xirc2ps_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
549static void 510static void
550xirc2ps_detach(struct pcmcia_device *link) 511xirc2ps_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 */
741static int 697static int
742xirc2ps_config(struct pcmcia_device * link) 698xirc2ps_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 */
988static void 935static void
989xirc2ps_release(struct pcmcia_device *link) 936xirc2ps_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
65static int airo_config(struct pcmcia_device *link); 56static int airo_config(struct pcmcia_device *link);
66static void airo_release(struct pcmcia_device *link); 57static 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
74static void airo_detach(struct pcmcia_device *p_dev); 59static void airo_detach(struct pcmcia_device *p_dev);
75 60
76typedef struct local_info_t { 61typedef 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
92static int airo_probe(struct pcmcia_device *p_dev) 65static 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
118static void airo_detach(struct pcmcia_device *link) 82static 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
140static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) 96static 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
211static void airo_release(struct pcmcia_device *link) 140static 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
75static int atmel_config(struct pcmcia_device *link); 66static int atmel_config(struct pcmcia_device *link);
76static void atmel_release(struct pcmcia_device *link); 67static 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
84static void atmel_detach(struct pcmcia_device *p_dev); 69static void atmel_detach(struct pcmcia_device *p_dev);
85 70
86typedef struct local_info_t { 71typedef 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
102static int atmel_probe(struct pcmcia_device *p_dev) 75static 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
128static void atmel_detach(struct pcmcia_device *link) 92static 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 */
147static int card_present(void *arg) 103static 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
234static void atmel_release(struct pcmcia_device *link) 165static 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
472static int prism2_config_check(struct pcmcia_device *p_dev, void *priv_data) 469static 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 */
772static void if_cs_release(struct pcmcia_device *p_dev) 763static 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
797static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) 778static 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 */
959static void if_cs_detach(struct pcmcia_device *p_dev) 929static 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. */
103static int 95static int
104orinoco_cs_probe(struct pcmcia_device *link) 96orinoco_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 */
128static void orinoco_cs_detach(struct pcmcia_device *link) 114static 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
145static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) 125static 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 */
236static void 192static void
237orinoco_cs_release(struct pcmcia_device *link) 193orinoco_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. */
164static int 156static int
165spectrum_cs_probe(struct pcmcia_device *link) 157spectrum_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 */
190static void spectrum_cs_detach(struct pcmcia_device *link) 176static 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
207static int spectrum_cs_config_check(struct pcmcia_device *p_dev, 187static 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 */
304static void 260static void
305spectrum_cs_release(struct pcmcia_device *link) 261spectrum_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 */
169static char *phy_addr = NULL; 169static 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*/
178static unsigned int ray_mem_speed = 500; 171static 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=============================================================================*/
300static int ray_probe(struct pcmcia_device *p_dev) 285static 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=============================================================================*/
360static void ray_detach(struct pcmcia_device *link) 339static 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
388static int ray_config(struct pcmcia_device *link) 362static 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=============================================================================*/
779static void ray_release(struct pcmcia_device *link) 746static 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 */
87static int wl3501_config(struct pcmcia_device *link); 80static int wl3501_config(struct pcmcia_device *link);
88static void wl3501_release(struct pcmcia_device *link); 81static 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 */
1880static int wl3501_probe(struct pcmcia_device *p_dev) 1864static 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 */
1923static int wl3501_config(struct pcmcia_device *link) 1899static 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 */
2019static void wl3501_release(struct pcmcia_device *link) 1984static void wl3501_release(struct pcmcia_device *link)
2020{ 1985{
2021 pcmcia_disable_device(link); 1986 pcmcia_disable_device(link);