[parisc-linux-cvs] fixed lasi_82596.c
Helge Deller
deller@gmx.de
Wed, 16 May 2001 03:50:08 +0200
reorganize request_mem_region() and release_mem_region() to get rid of the
"Trying to free not existant device at xxxxx-yyyyy" kernel msg at shutdown.
Index: lasi_82596.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/net/lasi_82596.c,v
retrieving revision 1.17
diff -u -r1.17 lasi_82596.c
--- lasi_82596.c 2001/04/06 05:10:55 1.17
+++ lasi_82596.c 2001/05/16 01:38:48
@@ -1008,6 +1008,8 @@
goto out_remove_rx_bufs;
}
+ request_mem_region(dev->base_addr, I596_TOTAL_SIZE, "i82596");
+
netif_start_queue(dev);
return 0;
@@ -1177,7 +1179,6 @@
dev->mem_start = (int)__get_free_pages(GFP_ATOMIC, 0);
if (!dev->mem_start) {
printk("%s: Couldn't get shared memory\n", dev->name);
- release_mem_region(dev->base_addr, I596_TOTAL_SIZE);
return -ENOMEM;
}
dma_addr = virt_to_bus(dev->mem_start);