diff options
Diffstat (limited to 'drivers/staging/wlags49_h2/wl_cs.c')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_cs.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c index c9d99d88b78..10abd406b09 100644 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c @@ -105,13 +105,6 @@ /******************************************************************************* - * macro definitions - ******************************************************************************/ -#define CS_CHECK(fn, ret) do { \ - last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; \ - } while (0) - -/******************************************************************************* * global definitions ******************************************************************************/ #if DBG @@ -302,7 +295,7 @@ void wl_adapter_insert( struct pcmcia_device *link ) { struct net_device *dev; int i; - int last_fn, last_ret; + int ret; /*------------------------------------------------------------------------*/ DBG_FUNC( "wl_adapter_insert" ); @@ -314,21 +307,27 @@ void wl_adapter_insert( struct pcmcia_device *link ) /* Do we need to allocate an interrupt? */ link->conf.Attributes |= CONF_ENABLE_IRQ; - CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); - CS_CHECK(RequestIRQ, pcmcia_request_irq(link, wl_isr)); - CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); + ret = pcmcia_request_io(link, &link->io); + if (ret != 0) + goto failed; + + ret = pcmcia_request_irq(link, (void *) wl_isr); + if (ret != 0) + goto failed; + ret = pcmcia_request_configuration(link, &link->conf); + if (ret != 0) + goto failed; dev->irq = link->irq; dev->base_addr = link->io.BasePort1; - SET_NETDEV_DEV(dev, &handle_to_dev(link)); + SET_NETDEV_DEV(dev, &link->dev); if (register_netdev(dev) != 0) { printk("%s: register_netdev() failed\n", MODULE_NAME); goto failed; } - link->dev_node = &( wl_priv(dev) )->node; - strcpy(( wl_priv(dev) )->node.dev_name, dev->name); + register_wlags_sysfs(dev); printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ", @@ -340,11 +339,6 @@ void wl_adapter_insert( struct pcmcia_device *link ) DBG_LEAVE( DbgInfo ); return; - -cs_failed: - cs_error( link, last_fn, last_ret ); - - failed: wl_adapter_release( link ); |