Commit 2262054e74b4b26ed56a8535c1259f6c6c2862a4

Authored by Dominik Brodowski
1 parent 06b3a1d12f

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>

Showing 35 changed files with 3 additions and 1526 deletions Side-by-side Diff

drivers/ide/ide-cs.c
... ... @@ -71,17 +71,6 @@
71 71  
72 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 74 static int ide_probe(struct pcmcia_device *link)
86 75 {
87 76 ide_info_t *info;
... ... @@ -102,15 +91,6 @@
102 91 return ide_config(link);
103 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 94 static void ide_detach(struct pcmcia_device *link)
115 95 {
116 96 ide_info_t *info = link->priv;
... ... @@ -184,14 +164,6 @@
184 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 167 static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data)
196 168 {
197 169 int *is_kme = priv_data;
... ... @@ -275,14 +247,6 @@
275 247 return -ENODEV;
276 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 250 static void ide_release(struct pcmcia_device *link)
287 251 {
288 252 ide_info_t *info = link->priv;
... ... @@ -307,15 +271,6 @@
307 271 pcmcia_disable_device(link);
308 272 } /* ide_release */
309 273  
310   -
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 274  
320 275 static struct pcmcia_device_id ide_ids[] = {
321 276 PCMCIA_DEVICE_FUNC_ID(4),
drivers/isdn/hardware/avm/avm_cs.c
... ... @@ -38,38 +38,10 @@
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 41 static int avmcs_config(struct pcmcia_device *link);
51 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 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 45 static int avmcs_probe(struct pcmcia_device *p_dev)
74 46 {
75 47 /* General socket configuration */
76 48  
77 49  
... ... @@ -80,28 +52,12 @@
80 52 return avmcs_config(p_dev);
81 53 } /* avmcs_attach */
82 54  
83   -/*======================================================================
84 55  
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   -
92 56 static void avmcs_detach(struct pcmcia_device *link)
93 57 {
94 58 avmcs_release(link);
95 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 61 static int avmcs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
106 62 {
107 63 p_dev->resource[0]->end = 16;
... ... @@ -185,13 +141,6 @@
185 141  
186 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 145 static void avmcs_release(struct pcmcia_device *link)
197 146 {
drivers/isdn/hisax/avma1_cs.c
... ... @@ -39,39 +39,10 @@
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 42 static int avma1cs_config(struct pcmcia_device *link) __devinit ;
52 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 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 46 static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
76 47 {
77 48 dev_dbg(&p_dev->dev, "avma1cs_attach()\n");
... ... @@ -84,15 +55,6 @@
84 55 return avma1cs_config(p_dev);
85 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 58 static void __devexit avma1cs_detach(struct pcmcia_device *link)
97 59 {
98 60 dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link);
... ... @@ -100,14 +62,6 @@
100 62 kfree(link->priv);
101 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 65 static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
112 66 {
113 67 p_dev->resource[0]->end = 16;
... ... @@ -180,14 +134,6 @@
180 134 return 0;
181 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 137 static void avma1cs_release(struct pcmcia_device *link)
192 138 {
193 139 unsigned long minor = (unsigned long) link->priv;
... ... @@ -200,7 +146,6 @@
200 146 pcmcia_disable_device(link);
201 147 } /* avma1cs_release */
202 148  
203   -
204 149 static struct pcmcia_device_id avma1cs_ids[] = {
205 150 PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb),
206 151 PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b),
... ... @@ -215,8 +160,6 @@
215 160 .remove = __devexit_p(avma1cs_detach),
216 161 .id_table = avma1cs_ids,
217 162 };
218   -
219   -/*====================================================================*/
220 163  
221 164 static int __init init_avma1_cs(void)
222 165 {
drivers/isdn/hisax/elsa_cs.c
... ... @@ -63,26 +63,8 @@
63 63 static int protocol = 2; /* EURO-ISDN Default */
64 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 66 static int elsa_cs_config(struct pcmcia_device *link) __devinit ;
78 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 68 static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit;
87 69  
88 70 typedef struct local_info_t {
... ... @@ -91,18 +73,6 @@
91 73 int cardnr;
92 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 76 static int __devinit elsa_cs_probe(struct pcmcia_device *link)
107 77 {
108 78 local_info_t *local;
... ... @@ -121,15 +91,6 @@
121 91 return elsa_cs_config(link);
122 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 94 static void __devexit elsa_cs_detach(struct pcmcia_device *link)
134 95 {
135 96 local_info_t *info = link->priv;
... ... @@ -142,14 +103,6 @@
142 103 kfree(info);
143 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 106 static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
154 107 {
155 108 int j;
... ... @@ -214,14 +167,6 @@
214 167 elsa_cs_release(link);
215 168 return -ENODEV;
216 169 } /* elsa_cs_config */
217   -
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 170  
226 171 static void elsa_cs_release(struct pcmcia_device *link)
227 172 {
drivers/isdn/hisax/sedlbauer_cs.c
... ... @@ -63,26 +63,9 @@
63 63 static int protocol = 2; /* EURO-ISDN Default */
64 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 66 static int sedlbauer_config(struct pcmcia_device *link) __devinit ;
78 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 69 static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit;
87 70  
88 71 typedef struct local_info_t {
... ... @@ -91,18 +74,6 @@
91 74 int cardnr;
92 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 77 static int __devinit sedlbauer_probe(struct pcmcia_device *link)
107 78 {
108 79 local_info_t *local;
109 80  
... ... @@ -117,30 +88,9 @@
117 88 local->p_dev = link;
118 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 91 return sedlbauer_config(link);
133 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 94 static void __devexit sedlbauer_detach(struct pcmcia_device *link)
145 95 {
146 96 dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link);
... ... @@ -152,13 +102,6 @@
152 102 kfree(link->priv);
153 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 105 static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data)
163 106 {
164 107 if (p_dev->config_index == 0)
... ... @@ -168,8 +111,6 @@
168 111 return pcmcia_request_io(p_dev);
169 112 }
170 113  
171   -
172   -
173 114 static int __devinit sedlbauer_config(struct pcmcia_device *link)
174 115 {
175 116 int ret;
176 117  
... ... @@ -180,27 +121,10 @@
180 121 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_CHECK_VCC |
181 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 124 ret = pcmcia_loop_config(link, sedlbauer_config_check, NULL);
196 125 if (ret)
197 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 128 ret = pcmcia_enable_device(link);
205 129 if (ret)
206 130 goto failed;
... ... @@ -227,14 +151,6 @@
227 151 return -ENODEV;
228 152  
229 153 } /* sedlbauer_config */
230   -
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 154  
239 155 static void sedlbauer_release(struct pcmcia_device *link)
240 156 {
drivers/isdn/hisax/teles_cs.c
... ... @@ -44,26 +44,8 @@
44 44 static int protocol = 2; /* EURO-ISDN Default */
45 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 47 static int teles_cs_config(struct pcmcia_device *link) __devinit ;
59 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 49 static void teles_detach(struct pcmcia_device *p_dev) __devexit ;
68 50  
69 51 typedef struct local_info_t {
... ... @@ -72,18 +54,6 @@
72 54 int cardnr;
73 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 57 static int __devinit teles_probe(struct pcmcia_device *link)
88 58 {
89 59 local_info_t *local;
90 60  
... ... @@ -98,27 +68,11 @@
98 68 local->p_dev = link;
99 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 71 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
109 72  
110 73 return teles_cs_config(link);
111 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 76 static void __devexit teles_detach(struct pcmcia_device *link)
123 77 {
124 78 local_info_t *info = link->priv;
... ... @@ -131,14 +85,6 @@
131 85 kfree(info);
132 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 88 static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
143 89 {
144 90 int j;
... ... @@ -203,14 +149,6 @@
203 149 teles_cs_release(link);
204 150 return -ENODEV;
205 151 } /* teles_cs_config */
206   -
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 152  
215 153 static void teles_cs_release(struct pcmcia_device *link)
216 154 {
drivers/mtd/maps/pcmciamtd.c
... ... @@ -321,11 +321,6 @@
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 324 static void pcmciamtd_release(struct pcmcia_device *link)
330 325 {
331 326 struct pcmciamtd_dev *dev = link->priv;
... ... @@ -475,11 +470,6 @@
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 473 static int pcmciamtd_config(struct pcmcia_device *link)
484 474 {
485 475 struct pcmciamtd_dev *dev = link->priv;
... ... @@ -676,12 +666,6 @@
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 669 static void pcmciamtd_detach(struct pcmcia_device *link)
686 670 {
687 671 struct pcmciamtd_dev *dev = link->priv;
... ... @@ -698,11 +682,6 @@
698 682 pcmciamtd_release(link);
699 683 }
700 684  
701   -
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 685  
707 686 static int pcmciamtd_probe(struct pcmcia_device *link)
708 687 {
drivers/net/pcmcia/3c574_cs.c
... ... @@ -287,17 +287,8 @@
287 287 dev->watchdog_timeo = TX_TIMEOUT;
288 288  
289 289 return tc574_config(link);
290   -} /* tc574_attach */
  290 +}
291 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   -
301 292 static void tc574_detach(struct pcmcia_device *link)
302 293 {
303 294 struct net_device *dev = link->priv;
... ... @@ -311,12 +302,6 @@
311 302 free_netdev(dev);
312 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 305 static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
321 306  
322 307 static int tc574_config(struct pcmcia_device *link)
... ... @@ -462,12 +447,6 @@
462 447 return -ENODEV;
463 448  
464 449 } /* tc574_config */
465   -
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 450  
472 451 static void tc574_release(struct pcmcia_device *link)
473 452 {
drivers/net/pcmcia/3c589_cs.c
... ... @@ -175,14 +175,6 @@
175 175  
176 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 178 static const struct net_device_ops el3_netdev_ops = {
187 179 .ndo_open = el3_open,
188 180 .ndo_stop = el3_close,
189 181  
... ... @@ -224,17 +216,8 @@
224 216 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
225 217  
226 218 return tc589_config(link);
227   -} /* tc589_attach */
  219 +}
228 220  
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   -
238 221 static void tc589_detach(struct pcmcia_device *link)
239 222 {
240 223 struct net_device *dev = link->priv;
... ... @@ -248,14 +231,6 @@
248 231 free_netdev(dev);
249 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 234 static int tc589_config(struct pcmcia_device *link)
260 235 {
261 236 struct net_device *dev = link->priv;
... ... @@ -349,14 +324,6 @@
349 324 tc589_release(link);
350 325 return -ENODEV;
351 326 } /* tc589_config */
352   -
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 327  
361 328 static void tc589_release(struct pcmcia_device *link)
362 329 {
drivers/net/pcmcia/axnet_cs.c
... ... @@ -139,14 +139,6 @@
139 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 142 static int axnet_probe(struct pcmcia_device *link)
151 143 {
152 144 axnet_dev_t *info;
... ... @@ -175,15 +167,6 @@
175 167 return axnet_config(link);
176 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 170 static void axnet_detach(struct pcmcia_device *link)
188 171 {
189 172 struct net_device *dev = link->priv;
... ... @@ -246,14 +229,6 @@
246 229 return 1;
247 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 232 static int try_io_port(struct pcmcia_device *link)
258 233 {
259 234 int j, ret;
... ... @@ -391,14 +366,6 @@
391 366 axnet_release(link);
392 367 return -ENODEV;
393 368 } /* axnet_config */
394   -
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 369  
403 370 static void axnet_release(struct pcmcia_device *link)
404 371 {
drivers/net/pcmcia/com20020_cs.c
... ... @@ -122,14 +122,6 @@
122 122 struct net_device *dev;
123 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 125 static int com20020_probe(struct pcmcia_device *p_dev)
134 126 {
135 127 com20020_dev_t *info;
... ... @@ -172,15 +164,6 @@
172 164 return -ENOMEM;
173 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 167 static void com20020_detach(struct pcmcia_device *link)
185 168 {
186 169 struct com20020_dev_t *info = link->priv;
... ... @@ -219,14 +202,6 @@
219 202  
220 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 205 static int com20020_config(struct pcmcia_device *link)
231 206 {
232 207 struct arcnet_local *lp;
... ... @@ -313,14 +288,6 @@
313 288 com20020_release(link);
314 289 return -ENODEV;
315 290 } /* com20020_config */
316   -
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 291  
325 292 static void com20020_release(struct pcmcia_device *link)
326 293 {
drivers/net/pcmcia/ibmtr_cs.c
... ... @@ -121,14 +121,6 @@
121 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 124 static int __devinit ibmtr_attach(struct pcmcia_device *link)
133 125 {
134 126 ibmtr_dev_t *info;
... ... @@ -161,15 +153,6 @@
161 153 return ibmtr_config(link);
162 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 156 static void ibmtr_detach(struct pcmcia_device *link)
174 157 {
175 158 struct ibmtr_dev_t *info = link->priv;
... ... @@ -194,14 +177,6 @@
194 177 kfree(info);
195 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 180 static int __devinit ibmtr_config(struct pcmcia_device *link)
206 181 {
207 182 ibmtr_dev_t *info = link->priv;
... ... @@ -296,14 +271,6 @@
296 271 ibmtr_release(link);
297 272 return -ENODEV;
298 273 } /* ibmtr_config */
299   -
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 274  
308 275 static void ibmtr_release(struct pcmcia_device *link)
309 276 {
drivers/net/pcmcia/nmclan_cs.c
... ... @@ -434,13 +434,6 @@
434 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 437 static int nmclan_probe(struct pcmcia_device *link)
445 438 {
446 439 mace_private *lp;
... ... @@ -472,14 +465,6 @@
472 465 return nmclan_config(link);
473 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 468 static void nmclan_detach(struct pcmcia_device *link)
484 469 {
485 470 struct net_device *dev = link->priv;
... ... @@ -623,13 +608,6 @@
623 608 return 0;
624 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 611 static int nmclan_config(struct pcmcia_device *link)
634 612 {
635 613 struct net_device *dev = link->priv;
... ... @@ -710,12 +688,6 @@
710 688 return -ENODEV;
711 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 691 static void nmclan_release(struct pcmcia_device *link)
720 692 {
721 693 dev_dbg(&link->dev, "nmclan_release\n");
drivers/net/pcmcia/pcnet_cs.c
... ... @@ -237,14 +237,6 @@
237 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 240 static int pcnet_probe(struct pcmcia_device *link)
249 241 {
250 242 pcnet_dev_t *info;
... ... @@ -266,15 +258,6 @@
266 258 return pcnet_config(link);
267 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 261 static void pcnet_detach(struct pcmcia_device *link)
279 262 {
280 263 struct net_device *dev = link->priv;
... ... @@ -461,14 +444,6 @@
461 444 return &default_info;
462 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 447 static int try_io_port(struct pcmcia_device *link)
473 448 {
474 449 int j, ret;
... ... @@ -665,14 +640,6 @@
665 640 return -ENODEV;
666 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 643 static void pcnet_release(struct pcmcia_device *link)
677 644 {
678 645 pcnet_dev_t *info = PRIV(link->priv);
... ... @@ -684,15 +651,6 @@
684 651  
685 652 pcmcia_disable_device(link);
686 653 }
687   -
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 654  
697 655 static int pcnet_suspend(struct pcmcia_device *link)
698 656 {
drivers/net/pcmcia/smc91c92_cs.c
... ... @@ -299,14 +299,6 @@
299 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 302 static int smc91c92_probe(struct pcmcia_device *link)
311 303 {
312 304 struct smc_private *smc;
... ... @@ -338,15 +330,6 @@
338 330 return smc91c92_config(link);
339 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 333 static void smc91c92_detach(struct pcmcia_device *link)
351 334 {
352 335 struct net_device *dev = link->priv;
... ... @@ -819,14 +802,6 @@
819 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 805 static int smc91c92_config(struct pcmcia_device *link)
831 806 {
832 807 struct net_device *dev = link->priv;
... ... @@ -976,14 +951,6 @@
976 951 free_netdev(dev);
977 952 return -ENODEV;
978 953 } /* smc91c92_config */
979   -
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 954  
988 955 static void smc91c92_release(struct pcmcia_device *link)
989 956 {
drivers/net/pcmcia/xirc2ps_cs.c
... ... @@ -266,33 +266,11 @@
266 266 static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg,
267 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 269 static int has_ce2_string(struct pcmcia_device * link);
278 270 static int xirc2ps_config(struct pcmcia_device * link);
279 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 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 274 static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id);
297 275  
298 276 typedef struct local_info_t {
... ... @@ -500,16 +478,6 @@
500 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 481 static int
514 482 xirc2ps_probe(struct pcmcia_device *link)
515 483 {
... ... @@ -539,13 +507,6 @@
539 507 return xirc2ps_config(link);
540 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 510 static void
550 511 xirc2ps_detach(struct pcmcia_device *link)
551 512 {
... ... @@ -733,11 +694,6 @@
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 697 static int
742 698 xirc2ps_config(struct pcmcia_device * link)
743 699 {
... ... @@ -861,10 +817,6 @@
861 817 if ((err=pcmcia_request_irq(link, xirc2ps_interrupt)))
862 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 820 link->config_flags |= CONF_ENABLE_IRQ;
869 821 if (do_sound)
870 822 link->config_flags |= CONF_ENABLE_SPKR;
... ... @@ -980,11 +932,6 @@
980 932 return -ENODEV;
981 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 935 static void
989 936 xirc2ps_release(struct pcmcia_device *link)
990 937 {
drivers/net/wireless/airo_cs.c
... ... @@ -53,42 +53,15 @@
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 56 static int airo_config(struct pcmcia_device *link);
66 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 59 static void airo_detach(struct pcmcia_device *p_dev);
75 60  
76 61 typedef struct local_info_t {
77 62 struct net_device *eth_dev;
78 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 65 static int airo_probe(struct pcmcia_device *p_dev)
93 66 {
94 67 local_info_t *local;
... ... @@ -106,15 +79,6 @@
106 79 return airo_config(p_dev);
107 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 82 static void airo_detach(struct pcmcia_device *link)
119 83 {
120 84 dev_dbg(&link->dev, "airo_detach\n");
... ... @@ -129,14 +93,6 @@
129 93 kfree(link->priv);
130 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 96 static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data)
141 97 {
142 98 if (p_dev->config_index == 0)
... ... @@ -158,20 +114,6 @@
158 114 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP |
159 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 117 ret = pcmcia_loop_config(link, airo_cs_config_check, NULL);
176 118 if (ret)
177 119 goto failed;
... ... @@ -179,11 +121,6 @@
179 121 if (!link->irq)
180 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 124 ret = pcmcia_enable_device(link);
188 125 if (ret)
189 126 goto failed;
... ... @@ -199,14 +136,6 @@
199 136 airo_release(link);
200 137 return -ENODEV;
201 138 } /* airo_config */
202   -
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 139  
211 140 static void airo_release(struct pcmcia_device *link)
212 141 {
drivers/net/wireless/atmel_cs.c
... ... @@ -63,42 +63,15 @@
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 66 static int atmel_config(struct pcmcia_device *link);
76 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 69 static void atmel_detach(struct pcmcia_device *p_dev);
85 70  
86 71 typedef struct local_info_t {
87 72 struct net_device *eth_dev;
88 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 75 static int atmel_probe(struct pcmcia_device *p_dev)
103 76 {
104 77 local_info_t *local;
... ... @@ -116,15 +89,6 @@
116 89 return atmel_config(p_dev);
117 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 92 static void atmel_detach(struct pcmcia_device *link)
129 93 {
130 94 dev_dbg(&link->dev, "atmel_detach\n");
... ... @@ -134,14 +98,6 @@
134 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 101 /* Call-back function to interrogate PCMCIA-specific information
146 102 about the current existance of the card */
147 103 static int card_present(void *arg)
... ... @@ -176,18 +132,6 @@
176 132 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP |
177 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 135 if (pcmcia_loop_config(link, atmel_config_check, NULL))
192 136 goto failed;
193 137  
... ... @@ -196,11 +140,6 @@
196 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 143 ret = pcmcia_enable_device(link);
205 144 if (ret)
206 145 goto failed;
... ... @@ -222,14 +161,6 @@
222 161 atmel_release(link);
223 162 return -ENODEV;
224 163 }
225   -
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 164  
234 165 static void atmel_release(struct pcmcia_device *link)
235 166 {
drivers/net/wireless/hostap/hostap_cs.c
... ... @@ -466,9 +466,6 @@
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 469 static int prism2_config_check(struct pcmcia_device *p_dev, void *priv_data)
473 470 {
474 471 if (p_dev->config_index == 0)
... ... @@ -530,11 +527,6 @@
530 527 if (ret)
531 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 530 ret = pcmcia_enable_device(link);
539 531 if (ret)
540 532 goto failed_unlock;
drivers/net/wireless/libertas/if_cs.c
... ... @@ -760,15 +760,6 @@
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 763 static void if_cs_release(struct pcmcia_device *p_dev)
773 764 {
774 765 struct if_cs_card *card = p_dev->priv;
... ... @@ -784,16 +775,6 @@
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 778 static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data)
798 779 {
799 780 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
... ... @@ -849,11 +830,6 @@
849 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 833 ret = pcmcia_enable_device(p_dev);
858 834 if (ret) {
859 835 lbs_pr_err("error in pcmcia_enable_device\n");
... ... @@ -950,12 +926,6 @@
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 929 static void if_cs_detach(struct pcmcia_device *p_dev)
960 930 {
961 931 struct if_cs_card *card = p_dev->priv;
drivers/net/wireless/orinoco/orinoco_cs.c
... ... @@ -92,14 +92,6 @@
92 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 95 static int
104 96 orinoco_cs_probe(struct pcmcia_device *link)
105 97 {
... ... @@ -119,12 +111,6 @@
119 111 return orinoco_cs_config(link);
120 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 114 static void orinoco_cs_detach(struct pcmcia_device *link)
129 115 {
130 116 struct orinoco_private *priv = link->priv;
... ... @@ -136,12 +122,6 @@
136 122 free_orinocodev(priv);
137 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 125 static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data)
146 126 {
147 127 if (p_dev->config_index == 0)
... ... @@ -158,20 +138,6 @@
158 138 int ret;
159 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 141 link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC |
176 142 CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
177 143 if (ignore_cis_vcc)
... ... @@ -199,11 +165,6 @@
199 165  
200 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 168 ret = pcmcia_enable_device(link);
208 169 if (ret)
209 170 goto failed;
... ... @@ -228,11 +189,6 @@
228 189 return -ENODEV;
229 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 192 static void
237 193 orinoco_cs_release(struct pcmcia_device *link)
238 194 {
drivers/net/wireless/orinoco/spectrum_cs.c
... ... @@ -153,14 +153,6 @@
153 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 156 static int
165 157 spectrum_cs_probe(struct pcmcia_device *link)
166 158 {
... ... @@ -181,12 +173,6 @@
181 173 return spectrum_cs_config(link);
182 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 176 static void spectrum_cs_detach(struct pcmcia_device *link)
191 177 {
192 178 struct orinoco_private *priv = link->priv;
... ... @@ -198,12 +184,6 @@
198 184 free_orinocodev(priv);
199 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 187 static int spectrum_cs_config_check(struct pcmcia_device *p_dev,
208 188 void *priv_data)
209 189 {
... ... @@ -221,20 +201,6 @@
221 201 int ret;
222 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 204 link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC |
239 205 CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
240 206 if (ignore_cis_vcc)
... ... @@ -263,11 +229,6 @@
263 229 hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
264 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 232 ret = pcmcia_enable_device(link);
272 233 if (ret)
273 234 goto failed;
... ... @@ -296,11 +257,6 @@
296 257 return -ENODEV;
297 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 260 static void
305 261 spectrum_cs_release(struct pcmcia_device *link)
306 262 {
drivers/net/wireless/ray_cs.c
... ... @@ -168,13 +168,6 @@
168 168 */
169 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 171 static unsigned int ray_mem_speed = 500;
179 172  
180 173 /* WARNING: THIS DRIVER IS NOT CAPABLE OF HANDLING MULTIPLE DEVICES! */
... ... @@ -289,14 +282,6 @@
289 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 285 static int ray_probe(struct pcmcia_device *p_dev)
301 286 {
302 287 ray_dev_t *local;
... ... @@ -351,12 +336,6 @@
351 336 return -ENOMEM;
352 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 339 static void ray_detach(struct pcmcia_device *link)
361 340 {
362 341 struct net_device *dev;
... ... @@ -379,11 +358,6 @@
379 358 dev_dbg(&link->dev, "ray_cs ray_detach ending\n");
380 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 361 #define MAX_TUPLE_SIZE 128
388 362 static int ray_config(struct pcmcia_device *link)
389 363 {
... ... @@ -409,9 +383,6 @@
409 383 goto failed;
410 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 386 ret = pcmcia_enable_device(link);
416 387 if (ret)
417 388 goto failed;
... ... @@ -771,11 +742,7 @@
771 742 local->card_status = CARD_DOING_ACQ;
772 743 }
773 744  
774   -/*============================================================================
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   -=============================================================================*/
  745 +
779 746 static void ray_release(struct pcmcia_device *link)
780 747 {
781 748 struct net_device *dev = link->priv;
drivers/net/wireless/wl3501_cs.c
... ... @@ -77,13 +77,6 @@
77 77 #define WL3501_RESUME 0
78 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 80 static int wl3501_config(struct pcmcia_device *link);
88 81 static void wl3501_release(struct pcmcia_device *link);
89 82  
... ... @@ -1868,15 +1861,6 @@
1868 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 1864 static int wl3501_probe(struct pcmcia_device *p_dev)
1881 1865 {
1882 1866 struct net_device *dev;
... ... @@ -1912,14 +1896,6 @@
1912 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 1899 static int wl3501_config(struct pcmcia_device *link)
1924 1900 {
1925 1901 struct net_device *dev = link->priv;
... ... @@ -1950,9 +1926,6 @@
1950 1926 if (ret)
1951 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 1929 ret = pcmcia_enable_device(link);
1957 1930 if (ret)
1958 1931 goto failed;
... ... @@ -2008,14 +1981,6 @@
2008 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 1984 static void wl3501_release(struct pcmcia_device *link)
2020 1985 {
2021 1986 pcmcia_disable_device(link);
drivers/parport/parport_cs.c
... ... @@ -80,14 +80,6 @@
80 80 static int parport_config(struct pcmcia_device *link);
81 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 83 static int parport_probe(struct pcmcia_device *link)
92 84 {
93 85 parport_info_t *info;
... ... @@ -105,15 +97,6 @@
105 97 return parport_config(link);
106 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 100 static void parport_detach(struct pcmcia_device *link)
118 101 {
119 102 dev_dbg(&link->dev, "parport_detach\n");
... ... @@ -123,14 +106,6 @@
123 106 kfree(link->priv);
124 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 109 static int parport_config_check(struct pcmcia_device *p_dev, void *priv_data)
135 110 {
136 111 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
... ... @@ -186,14 +161,6 @@
186 161 parport_cs_release(link);
187 162 return -ENODEV;
188 163 } /* parport_config */
189   -
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 164  
198 165 static void parport_cs_release(struct pcmcia_device *link)
199 166 {
drivers/scsi/pcmcia/nsp_cs.c
... ... @@ -1530,15 +1530,6 @@
1530 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 1533 static int nsp_cs_probe(struct pcmcia_device *link)
1543 1534 {
1544 1535 scsi_info_t *info;
... ... @@ -1563,12 +1554,6 @@
1563 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 1557 static void nsp_cs_detach(struct pcmcia_device *link)
1573 1558 {
1574 1559 nsp_dbg(NSP_DEBUG_INIT, "in, link=0x%p", link);
... ... @@ -1581,12 +1566,6 @@
1581 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 1569 static int nsp_cs_config_check(struct pcmcia_device *p_dev, void *priv_data)
1591 1570 {
1592 1571 nsp_hw_data *data = priv_data;
... ... @@ -1697,11 +1676,6 @@
1697 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 1679 static void nsp_cs_release(struct pcmcia_device *link)
1706 1680 {
1707 1681 scsi_info_t *info = link->priv;
drivers/serial/serial_cs.c
... ... @@ -262,13 +262,6 @@
262 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 265 static void serial_remove(struct pcmcia_device *link)
273 266 {
274 267 struct serial_info *info = link->priv;
... ... @@ -311,14 +304,6 @@
311 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 307 static int serial_probe(struct pcmcia_device *link)
323 308 {
324 309 struct serial_info *info;
... ... @@ -339,15 +324,6 @@
339 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 327 static void serial_detach(struct pcmcia_device *link)
352 328 {
353 329 struct serial_info *info = link->priv;
... ... @@ -630,14 +606,6 @@
630 606 return 0; /* break */
631 607 }
632 608  
633   -
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 609  
642 610 static int serial_config(struct pcmcia_device * link)
643 611 {
drivers/staging/comedi/drivers/cb_das16_cs.c
... ... @@ -736,11 +736,6 @@
736 736 if (!link->irq)
737 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 739 ret = pcmcia_enable_device(link);
745 740 if (ret)
746 741 goto failed;
drivers/staging/comedi/drivers/das08_cs.c
... ... @@ -114,40 +114,15 @@
114 114 static int das08_pcmcia_suspend(struct pcmcia_device *p_dev);
115 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 117 static int das08_pcmcia_attach(struct pcmcia_device *);
124 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 120 struct local_info_t {
134 121 struct pcmcia_device *link;
135 122 int stop;
136 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 126 static int das08_pcmcia_attach(struct pcmcia_device *link)
152 127 {
153 128 struct local_info_t *local;
... ... @@ -168,15 +143,6 @@
168 143 return 0;
169 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 146 static void das08_pcmcia_detach(struct pcmcia_device *link)
181 147 {
182 148  
... ... @@ -200,15 +166,6 @@
200 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 169 static void das08_pcmcia_config(struct pcmcia_device *link)
213 170 {
214 171 int ret;
... ... @@ -226,11 +183,6 @@
226 183 if (!link->irq)
227 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 186 ret = pcmcia_enable_device(link);
235 187 if (ret)
236 188 goto failed;
237 189  
... ... @@ -242,31 +194,11 @@
242 194  
243 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 197 static void das08_pcmcia_release(struct pcmcia_device *link)
254 198 {
255 199 dev_dbg(&link->dev, "das08_pcmcia_release\n");
256 200 pcmcia_disable_device(link);
257 201 } /* das08_pcmcia_release */
258   -
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 202  
271 203 static int das08_pcmcia_suspend(struct pcmcia_device *link)
272 204 {
drivers/staging/comedi/drivers/ni_daq_700.c
... ... @@ -434,47 +434,20 @@
434 434 return 0;
435 435 };
436 436  
437   -/* PCMCIA crap -- watch your words, please! */
438   -
439 437 static void dio700_config(struct pcmcia_device *link);
440 438 static void dio700_release(struct pcmcia_device *link);
441 439 static int dio700_cs_suspend(struct pcmcia_device *p_dev);
442 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 442 static int dio700_cs_attach(struct pcmcia_device *);
451 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 445 struct local_info_t {
461 446 struct pcmcia_device *link;
462 447 int stop;
463 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 451 static int dio700_cs_attach(struct pcmcia_device *link)
479 452 {
480 453 struct local_info_t *local;
... ... @@ -497,15 +470,6 @@
497 470 return 0;
498 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 473 static void dio700_cs_detach(struct pcmcia_device *link)
510 474 {
511 475  
... ... @@ -521,14 +485,6 @@
521 485  
522 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 488 static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,
533 489 void *priv_data)
534 490 {
... ... @@ -559,11 +515,6 @@
559 515 if (!link->irq)
560 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 518 ret = pcmcia_enable_device(link);
568 519 if (ret != 0)
569 520 goto failed;
... ... @@ -582,18 +533,6 @@
582 533  
583 534 pcmcia_disable_device(link);
584 535 } /* dio700_release */
585   -
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 536  
598 537 static int dio700_cs_suspend(struct pcmcia_device *link)
599 538 {
drivers/staging/comedi/drivers/ni_daq_dio24.c
... ... @@ -186,47 +186,20 @@
186 186 return 0;
187 187 };
188 188  
189   -/* PCMCIA crap -- watch your words! */
190   -
191 189 static void dio24_config(struct pcmcia_device *link);
192 190 static void dio24_release(struct pcmcia_device *link);
193 191 static int dio24_cs_suspend(struct pcmcia_device *p_dev);
194 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 194 static int dio24_cs_attach(struct pcmcia_device *);
203 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 197 struct local_info_t {
213 198 struct pcmcia_device *link;
214 199 int stop;
215 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 203 static int dio24_cs_attach(struct pcmcia_device *link)
231 204 {
232 205 struct local_info_t *local;
... ... @@ -249,15 +222,6 @@
249 222 return 0;
250 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 225 static void dio24_cs_detach(struct pcmcia_device *link)
262 226 {
263 227  
... ... @@ -273,14 +237,6 @@
273 237  
274 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 240 static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
285 241 void *priv_data)
286 242 {
... ... @@ -310,11 +266,6 @@
310 266 if (!link->irq)
311 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 269 ret = pcmcia_enable_device(link);
319 270 if (ret)
320 271 goto failed;
... ... @@ -333,18 +284,6 @@
333 284  
334 285 pcmcia_disable_device(link);
335 286 } /* dio24_release */
336   -
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 287  
349 288 static int dio24_cs_suspend(struct pcmcia_device *link)
350 289 {
drivers/staging/comedi/drivers/ni_labpc_cs.c
... ... @@ -152,59 +152,20 @@
152 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 155 static void labpc_config(struct pcmcia_device *link);
170 156 static void labpc_release(struct pcmcia_device *link);
171 157 static int labpc_cs_suspend(struct pcmcia_device *p_dev);
172 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 160 static int labpc_cs_attach(struct pcmcia_device *);
181 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 163 struct local_info_t {
191 164 struct pcmcia_device *link;
192 165 int stop;
193 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 169 static int labpc_cs_attach(struct pcmcia_device *link)
209 170 {
210 171 struct local_info_t *local;
... ... @@ -225,15 +186,6 @@
225 186 return 0;
226 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 189 static void labpc_cs_detach(struct pcmcia_device *link)
238 190 {
239 191 dev_dbg(&link->dev, "labpc_cs_detach\n");
... ... @@ -252,14 +204,6 @@
252 204  
253 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 207 static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
264 208 void *priv_data)
265 209 {
... ... @@ -288,11 +232,6 @@
288 232 if (!link->irq)
289 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 235 ret = pcmcia_enable_device(link);
297 236 if (ret)
298 237 goto failed;
... ... @@ -311,18 +250,6 @@
311 250 pcmcia_disable_device(link);
312 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 253 static int labpc_cs_suspend(struct pcmcia_device *link)
327 254 {
328 255 struct local_info_t *local = link->priv;
... ... @@ -339,8 +266,6 @@
339 266 local->stop = 0;
340 267 return 0;
341 268 } /* labpc_cs_resume */
342   -
343   -/*====================================================================*/
344 269  
345 270 static struct pcmcia_device_id labpc_cs_ids[] = {
346 271 /* N.B. These IDs should match those in labpc_cs_boards (ni_labpc.c) */
drivers/staging/comedi/drivers/quatech_daqp_cs.c
... ... @@ -968,43 +968,14 @@
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 971 static void daqp_cs_config(struct pcmcia_device *link);
983 972 static void daqp_cs_release(struct pcmcia_device *link);
984 973 static int daqp_cs_suspend(struct pcmcia_device *p_dev);
985 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 976 static int daqp_cs_attach(struct pcmcia_device *);
994 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 979 static int daqp_cs_attach(struct pcmcia_device *link)
1009 980 {
1010 981 struct local_info_t *local;
... ... @@ -1035,15 +1006,6 @@
1035 1006 return 0;
1036 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 1009 static void daqp_cs_detach(struct pcmcia_device *link)
1048 1010 {
1049 1011 struct local_info_t *dev = link->priv;
... ... @@ -1059,15 +1021,6 @@
1059 1021  
1060 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 1024 static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev, void *priv_data)
1072 1025 {
1073 1026 if (p_dev->config_index == 0)
... ... @@ -1094,11 +1047,6 @@
1094 1047 if (ret)
1095 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 1050 ret = pcmcia_enable_device(link);
1103 1051 if (ret)
1104 1052 goto failed;
... ... @@ -1116,18 +1064,6 @@
1116 1064  
1117 1065 pcmcia_disable_device(link);
1118 1066 } /* daqp_cs_release */
1119   -
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 1067  
1132 1068 static int daqp_cs_suspend(struct pcmcia_device *link)
1133 1069 {
drivers/staging/wlags49_h2/wl_cs.c
... ... @@ -163,27 +163,6 @@
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 166 static void wl_adapter_detach(struct pcmcia_device *link)
188 167 {
189 168 struct net_device *dev = link->priv;
... ... @@ -207,26 +186,6 @@
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 189 void wl_adapter_release(struct pcmcia_device *link)
231 190 {
232 191 DBG_FUNC("wl_adapter_release");
... ... @@ -266,26 +225,6 @@
266 225 return 0;
267 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 228 void wl_adapter_insert(struct pcmcia_device *link)
290 229 {
291 230 struct net_device *dev;
drivers/staging/wlags49_h2/wl_main.c
... ... @@ -414,25 +414,6 @@
414 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 417 int wl_insert( struct net_device *dev )
437 418 {
438 419 int result = 0;