aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-08-15 02:38:38 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 11:20:25 -0400
commit2262054e74b4b26ed56a8535c1259f6c6c2862a4 (patch)
treefbcd0aa7879408b9676c2df6c7514e5d7428880a /drivers/net/wireless/atmel_cs.c
parent06b3a1d12f41b592972643f8b84015d6c03dc576 (diff)
pcmcia: remove obsolete and wrong comments
What's worse than no comment? A wrong comment. Several PCMCIA device drivers contained the same comments, which were based on how the PCMCIA subsystem worked in the old days of 2.4., and which were originally part of a "dummy_cs" driver. These comments no longer matched at all what is happening now, and therefore should be removed. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/atmel_cs.c')
-rw-r--r--drivers/net/wireless/atmel_cs.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index fabe91a8db2b..c96e19da2949 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -63,42 +63,15 @@ MODULE_SUPPORTED_DEVICE("Atmel at76c50x PCMCIA cards");
63 63
64/*====================================================================*/ 64/*====================================================================*/
65 65
66/*
67 The event() function is this driver's Card Services event handler.
68 It will be called by Card Services when an appropriate card status
69 event is received. The config() and release() entry points are
70 used to configure or release a socket, in response to card
71 insertion and ejection events. They are invoked from the atmel_cs
72 event handler.
73*/
74
75static int atmel_config(struct pcmcia_device *link); 66static int atmel_config(struct pcmcia_device *link);
76static void atmel_release(struct pcmcia_device *link); 67static void atmel_release(struct pcmcia_device *link);
77 68
78/*
79 The attach() and detach() entry points are used to create and destroy
80 "instances" of the driver, where each instance represents everything
81 needed to manage one actual PCMCIA card.
82*/
83
84static void atmel_detach(struct pcmcia_device *p_dev); 69static void atmel_detach(struct pcmcia_device *p_dev);
85 70
86typedef struct local_info_t { 71typedef struct local_info_t {
87 struct net_device *eth_dev; 72 struct net_device *eth_dev;
88} local_info_t; 73} local_info_t;
89 74
90/*======================================================================
91
92 atmel_attach() creates an "instance" of the driver, allocating
93 local data structures for one device. The device is registered
94 with Card Services.
95
96 The dev_link structure is initialized, but we don't actually
97 configure the card at this point -- we wait until we receive a
98 card insertion event.
99
100 ======================================================================*/
101
102static int atmel_probe(struct pcmcia_device *p_dev) 75static int atmel_probe(struct pcmcia_device *p_dev)
103{ 76{
104 local_info_t *local; 77 local_info_t *local;
@@ -116,15 +89,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)
116 return atmel_config(p_dev); 89 return atmel_config(p_dev);
117} /* atmel_attach */ 90} /* atmel_attach */
118 91
119/*======================================================================
120
121 This deletes a driver "instance". The device is de-registered
122 with Card Services. If it has been released, all local data
123 structures are freed. Otherwise, the structures will be freed
124 when the device is released.
125
126 ======================================================================*/
127
128static void atmel_detach(struct pcmcia_device *link) 92static void atmel_detach(struct pcmcia_device *link)
129{ 93{
130 dev_dbg(&link->dev, "atmel_detach\n"); 94 dev_dbg(&link->dev, "atmel_detach\n");
@@ -134,14 +98,6 @@ static void atmel_detach(struct pcmcia_device *link)
134 kfree(link->priv); 98 kfree(link->priv);
135} 99}
136 100
137/*======================================================================
138
139 atmel_config() is scheduled to run after a CARD_INSERTION event
140 is received, to configure the PCMCIA socket, and to make the
141 device available to the system.
142
143 ======================================================================*/
144
145/* Call-back function to interrogate PCMCIA-specific information 101/* Call-back function to interrogate PCMCIA-specific information
146 about the current existance of the card */ 102 about the current existance of the card */
147static int card_present(void *arg) 103static int card_present(void *arg)
@@ -176,18 +132,6 @@ static int atmel_config(struct pcmcia_device *link)
176 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | 132 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP |
177 CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; 133 CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
178 134
179 /*
180 In this loop, we scan the CIS for configuration table entries,
181 each of which describes a valid card configuration, including
182 voltage, IO window, memory window, and interrupt settings.
183
184 We make no assumptions about the card to be configured: we use
185 just the information available in the CIS. In an ideal world,
186 this would work for any PCMCIA card, but it requires a complete
187 and accurate CIS. In practice, a driver usually "knows" most of
188 these things without consulting the CIS, and most client drivers
189 will only use the CIS to fill in implementation-defined details.
190 */
191 if (pcmcia_loop_config(link, atmel_config_check, NULL)) 135 if (pcmcia_loop_config(link, atmel_config_check, NULL))
192 goto failed; 136 goto failed;
193 137
@@ -196,11 +140,6 @@ static int atmel_config(struct pcmcia_device *link)
196 goto failed; 140 goto failed;
197 } 141 }
198 142
199 /*
200 This actually configures the PCMCIA socket -- setting up
201 the I/O windows and the interrupt mapping, and putting the
202 card and host interface into "Memory and IO" mode.
203 */
204 ret = pcmcia_enable_device(link); 143 ret = pcmcia_enable_device(link);
205 if (ret) 144 if (ret)
206 goto failed; 145 goto failed;
@@ -223,14 +162,6 @@ static int atmel_config(struct pcmcia_device *link)
223 return -ENODEV; 162 return -ENODEV;
224} 163}
225 164
226/*======================================================================
227
228 After a card is removed, atmel_release() will unregister the
229 device, and release the PCMCIA configuration. If the device is
230 still open, this will be postponed until it is closed.
231
232 ======================================================================*/
233
234static void atmel_release(struct pcmcia_device *link) 165static void atmel_release(struct pcmcia_device *link)
235{ 166{
236 struct net_device *dev = ((local_info_t*)link->priv)->eth_dev; 167 struct net_device *dev = ((local_info_t*)link->priv)->eth_dev;