aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/orinoco_cs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-20 12:09:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-20 12:09:46 -0400
commit54291263519ac2c9bdda68b23b02fef3808deed4 (patch)
treed71de8172a6ab2bbe3068aece7d8911eeeb276fd /drivers/net/wireless/orinoco/orinoco_cs.c
parent46ee9645094ad1eb5b4888882ecaa1fb87dcd2a3 (diff)
parentacd200bf45487271d54f05938ad9e30f32a530ee (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (29 commits) pcmcia: disable PCMCIA ioctl also for ARM drivers/staging/comedi: dev_node removal (quatech_daqp_cs) drivers/staging/comedi: dev_node removal (ni_mio_cs) drivers/staging/comedi: dev_node removal (ni_labpc_cs) drivers/staging/comedi: dev_node removal (ni_daq_dio24) drivers/staging/comedi: dev_node removal (ni_daq_700) drivers/staging/comedi: dev_node removal (das08_cs) drivers/staging/comedi: dev_node removal (cb_das16_cs) pata_pcmcia: get rid of extra indirection pcmcia: remove suspend-related comment from yenta_socket.c pcmcia: call pcmcia_{read,write}_cis_mem with ops_mutex held pcmcia: remove pcmcia_add_device_lock pcmcia: update gfp/slab.h includes pcmcia: remove unused mem_op.h pcmcia: do not autoadd root PCI bus resources pcmcia: clarify alloc_io_space, move it to resource handlers pcmcia: move all pcmcia_resource_ops providers into one module pcmcia: move high level CIS access code to separate file pcmcia: dev_node removal (core) pcmcia: dev_node removal (remaining drivers) ...
Diffstat (limited to 'drivers/net/wireless/orinoco/orinoco_cs.c')
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 1d4ada188eda..03056ab73032 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -50,7 +50,6 @@ MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket
50 * struct orinoco_private */ 50 * struct orinoco_private */
51struct orinoco_pccard { 51struct orinoco_pccard {
52 struct pcmcia_device *p_dev; 52 struct pcmcia_device *p_dev;
53 dev_node_t node;
54 53
55 /* Used to handle hard reset */ 54 /* Used to handle hard reset */
56 /* yuck, we need this hack to work around the insanity of the 55 /* yuck, we need this hack to work around the insanity of the
@@ -119,10 +118,6 @@ orinoco_cs_probe(struct pcmcia_device *link)
119 card->p_dev = link; 118 card->p_dev = link;
120 link->priv = priv; 119 link->priv = priv;
121 120
122 /* Interrupt setup */
123 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
124 link->irq.Handler = orinoco_interrupt;
125
126 /* General socket configuration defaults can go here. In this 121 /* General socket configuration defaults can go here. In this
127 * client, we assume very little, and rely on the CIS for 122 * client, we assume very little, and rely on the CIS for
128 * almost everything. In most clients, many details (i.e., 123 * almost everything. In most clients, many details (i.e.,
@@ -144,8 +139,7 @@ static void orinoco_cs_detach(struct pcmcia_device *link)
144{ 139{
145 struct orinoco_private *priv = link->priv; 140 struct orinoco_private *priv = link->priv;
146 141
147 if (link->dev_node) 142 orinoco_if_del(priv);
148 orinoco_if_del(priv);
149 143
150 orinoco_cs_release(link); 144 orinoco_cs_release(link);
151 145
@@ -230,7 +224,6 @@ static int
230orinoco_cs_config(struct pcmcia_device *link) 224orinoco_cs_config(struct pcmcia_device *link)
231{ 225{
232 struct orinoco_private *priv = link->priv; 226 struct orinoco_private *priv = link->priv;
233 struct orinoco_pccard *card = priv->card;
234 hermes_t *hw = &priv->hw; 227 hermes_t *hw = &priv->hw;
235 int ret; 228 int ret;
236 void __iomem *mem; 229 void __iomem *mem;
@@ -258,12 +251,7 @@ orinoco_cs_config(struct pcmcia_device *link)
258 goto failed; 251 goto failed;
259 } 252 }
260 253
261 /* 254 ret = pcmcia_request_irq(link, orinoco_interrupt);
262 * Allocate an interrupt line. Note that this does not assign
263 * a handler to the interrupt, unless the 'Handler' member of
264 * the irq structure is initialized.
265 */
266 ret = pcmcia_request_irq(link, &link->irq);
267 if (ret) 255 if (ret)
268 goto failed; 256 goto failed;
269 257
@@ -285,9 +273,6 @@ orinoco_cs_config(struct pcmcia_device *link)
285 if (ret) 273 if (ret)
286 goto failed; 274 goto failed;
287 275
288 /* Ok, we have the configuration, prepare to register the netdev */
289 card->node.major = card->node.minor = 0;
290
291 /* Initialise the main driver */ 276 /* Initialise the main driver */
292 if (orinoco_init(priv) != 0) { 277 if (orinoco_init(priv) != 0) {
293 printk(KERN_ERR PFX "orinoco_init() failed\n"); 278 printk(KERN_ERR PFX "orinoco_init() failed\n");
@@ -296,17 +281,11 @@ orinoco_cs_config(struct pcmcia_device *link)
296 281
297 /* Register an interface with the stack */ 282 /* Register an interface with the stack */
298 if (orinoco_if_add(priv, link->io.BasePort1, 283 if (orinoco_if_add(priv, link->io.BasePort1,
299 link->irq.AssignedIRQ) != 0) { 284 link->irq) != 0) {
300 printk(KERN_ERR PFX "orinoco_if_add() failed\n"); 285 printk(KERN_ERR PFX "orinoco_if_add() failed\n");
301 goto failed; 286 goto failed;
302 } 287 }
303 288
304 /* At this point, the dev_node_t structure(s) needs to be
305 * initialized and arranged in a linked list at link->dev_node. */
306 strcpy(card->node.dev_name, priv->ndev->name);
307 link->dev_node = &card->node; /* link->dev_node being non-NULL is also
308 * used to indicate that the
309 * net_device has been registered */
310 return 0; 289 return 0;
311 290
312 failed: 291 failed: