diff options
Diffstat (limited to 'drivers/staging/slicoss/slicoss.c')
-rw-r--r-- | drivers/staging/slicoss/slicoss.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index b61ac4b2db9..8fa9490b3e2 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -54,7 +54,6 @@ * IS-NIC driver. */ -#include <linux/version.h> #define SLIC_DUMP_ENABLED 0 #define KLUDGE_FOR_4GB_BOUNDARY 1 @@ -96,17 +95,9 @@ #include <linux/moduleparam.h> #include <linux/types.h> -#include <linux/slab.h> -#include <linux/delay.h> -#include <linux/init.h> -#include <linux/pci.h> #include <linux/dma-mapping.h> -#include <linux/netdevice.h> -#include <linux/etherdevice.h> #include <linux/mii.h> #include <linux/if_vlan.h> -#include <linux/skbuff.h> -#include <linux/string.h> #include <asm/unaligned.h> #include <linux/ethtool.h> @@ -275,7 +266,6 @@ static void slic_dbg_register_trace(struct adapter *adapter, card->reg_value[i], card->reg_valueh[i]); } } -} #endif static void slic_init_adapter(struct net_device *netdev, @@ -606,6 +596,7 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) uint mmio_len = 0; struct adapter *adapter = (struct adapter *) netdev_priv(dev); struct sliccard *card; + struct mcast_address *mcaddr, *mlist; ASSERT(adapter); DBG_MSG("slicoss: %s ENTER dev[%p] adapter[%p]\n", __func__, dev, @@ -625,6 +616,13 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) DBG_MSG("slicoss: %s iounmap dev->base_addr[%x]\n", __func__, (uint) dev->base_addr); iounmap((void __iomem *)dev->base_addr); + /* free multicast addresses */ + mlist = adapter->mcastaddrs; + while (mlist) { + mcaddr = mlist; + mlist = mlist->next; + kfree(mcaddr); + } ASSERT(adapter->card); card = adapter->card; ASSERT(card->adapters_allocated); |