diff options
Diffstat (limited to 'drivers/net/pcmcia/ibmtr_cs.c')
-rw-r--r-- | drivers/net/pcmcia/ibmtr_cs.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index 37f4a6fdc3ef..2e42d80f8cae 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
@@ -104,7 +104,6 @@ static void ibmtr_detach(struct pcmcia_device *p_dev); | |||
104 | typedef struct ibmtr_dev_t { | 104 | typedef struct ibmtr_dev_t { |
105 | struct pcmcia_device *p_dev; | 105 | struct pcmcia_device *p_dev; |
106 | struct net_device *dev; | 106 | struct net_device *dev; |
107 | dev_node_t node; | ||
108 | window_handle_t sram_win_handle; | 107 | window_handle_t sram_win_handle; |
109 | struct tok_info *ti; | 108 | struct tok_info *ti; |
110 | } ibmtr_dev_t; | 109 | } ibmtr_dev_t; |
@@ -156,8 +155,6 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) | |||
156 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 155 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
157 | link->io.NumPorts1 = 4; | 156 | link->io.NumPorts1 = 4; |
158 | link->io.IOAddrLines = 16; | 157 | link->io.IOAddrLines = 16; |
159 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | ||
160 | link->irq.Handler = ibmtr_interrupt; | ||
161 | link->conf.Attributes = CONF_ENABLE_IRQ; | 158 | link->conf.Attributes = CONF_ENABLE_IRQ; |
162 | link->conf.IntType = INT_MEMORY_AND_IO; | 159 | link->conf.IntType = INT_MEMORY_AND_IO; |
163 | link->conf.Present = PRESENT_OPTION; | 160 | link->conf.Present = PRESENT_OPTION; |
@@ -192,8 +189,7 @@ static void ibmtr_detach(struct pcmcia_device *link) | |||
192 | */ | 189 | */ |
193 | ti->sram_phys |= 1; | 190 | ti->sram_phys |= 1; |
194 | 191 | ||
195 | if (link->dev_node) | 192 | unregister_netdev(dev); |
196 | unregister_netdev(dev); | ||
197 | 193 | ||
198 | del_timer_sync(&(ti->tr_timer)); | 194 | del_timer_sync(&(ti->tr_timer)); |
199 | 195 | ||
@@ -238,11 +234,11 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) | |||
238 | } | 234 | } |
239 | dev->base_addr = link->io.BasePort1; | 235 | dev->base_addr = link->io.BasePort1; |
240 | 236 | ||
241 | ret = pcmcia_request_irq(link, &link->irq); | 237 | ret = pcmcia_request_exclusive_irq(link, ibmtr_interrupt); |
242 | if (ret) | 238 | if (ret) |
243 | goto failed; | 239 | goto failed; |
244 | dev->irq = link->irq.AssignedIRQ; | 240 | dev->irq = link->irq; |
245 | ti->irq = link->irq.AssignedIRQ; | 241 | ti->irq = link->irq; |
246 | ti->global_int_enable=GLOBAL_INT_ENABLE+((dev->irq==9) ? 2 : dev->irq); | 242 | ti->global_int_enable=GLOBAL_INT_ENABLE+((dev->irq==9) ? 2 : dev->irq); |
247 | 243 | ||
248 | /* Allocate the MMIO memory window */ | 244 | /* Allocate the MMIO memory window */ |
@@ -291,18 +287,14 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) | |||
291 | Adapters Technical Reference" SC30-3585 for this info. */ | 287 | Adapters Technical Reference" SC30-3585 for this info. */ |
292 | ibmtr_hw_setup(dev, mmiobase); | 288 | ibmtr_hw_setup(dev, mmiobase); |
293 | 289 | ||
294 | link->dev_node = &info->node; | ||
295 | SET_NETDEV_DEV(dev, &link->dev); | 290 | SET_NETDEV_DEV(dev, &link->dev); |
296 | 291 | ||
297 | i = ibmtr_probe_card(dev); | 292 | i = ibmtr_probe_card(dev); |
298 | if (i != 0) { | 293 | if (i != 0) { |
299 | printk(KERN_NOTICE "ibmtr_cs: register_netdev() failed\n"); | 294 | printk(KERN_NOTICE "ibmtr_cs: register_netdev() failed\n"); |
300 | link->dev_node = NULL; | ||
301 | goto failed; | 295 | goto failed; |
302 | } | 296 | } |
303 | 297 | ||
304 | strcpy(info->node.dev_name, dev->name); | ||
305 | |||
306 | printk(KERN_INFO | 298 | printk(KERN_INFO |
307 | "%s: port %#3lx, irq %d, mmio %#5lx, sram %#5lx, hwaddr=%pM\n", | 299 | "%s: port %#3lx, irq %d, mmio %#5lx, sram %#5lx, hwaddr=%pM\n", |
308 | dev->name, dev->base_addr, dev->irq, | 300 | dev->name, dev->base_addr, dev->irq, |