Hi, The included patch rids the 10/100/1000 ethernet drivers of deprecated MOD_[INC|DEC]_USE_COUNT in favor of SET_MODULE_OWNER. There are a bunch more to do under drivers/net/ but I figure I'll start out small. The only wierd one is sk98lin/skge.c, I don't know what proc_fill_inode() was doing but I don't see any harm making it go away. -David The patch is against 2.5.56, modular compilation has been tested. * drivers/net/82596.c, ni65.c, pcnet32.c, tulip/de4x5.c : Remove deprecated MOD_INC_USE_COUNT, MOD_DEC_USE_COUNT in favor of SET_MODULE_OWNER. * drivers/net/sk98lin/skge.c : Same as above plus remove unused function proc_fill_inode(). * drivers/net/sk98lin/skproc.c : Remove prototype for proc_fill_inode(). diff -x'*.o' -x'.*' -x'*.ko' -ur linux-2.5.56/drivers/net/82596.c linux-2.5.x/drivers/net/82596.c --- linux-2.5.56/drivers/net/82596.c 2003-01-10 12:12:11.000000000 -0800 +++ linux-2.5.x/drivers/net/82596.c 2003-01-12 21:29:03.000000000 -0800 @@ -1018,8 +1018,6 @@ netif_start_queue(dev); - MOD_INC_USE_COUNT; - /* Initialize the 82596 memory */ if (init_i596_mem(dev)) { res = -EAGAIN; @@ -1204,6 +1202,8 @@ ether_setup(dev); DEB(DEB_PROBE,printk(KERN_INFO "%s: 82596 at %#3lx,", dev->name, dev->base_addr)); + SET_MODULE_OWNER(dev); + for (i = 0; i < 6; i++) DEB(DEB_PROBE,printk(" %2.2X", dev->dev_addr[i] = eth_addr[i])); @@ -1444,7 +1444,6 @@ free_irq(dev->irq, dev); remove_rx_bufs(dev); - MOD_DEC_USE_COUNT; return 0; } diff -x'*.o' -x'.*' -x'*.ko' -ur linux-2.5.56/drivers/net/ni65.c linux-2.5.x/drivers/net/ni65.c --- linux-2.5.56/drivers/net/ni65.c 2003-01-10 12:11:40.000000000 -0800 +++ linux-2.5.x/drivers/net/ni65.c 2003-01-12 19:27:06.000000000 -0800 @@ -307,7 +307,6 @@ if(ni65_lance_reinit(dev)) { netif_start_queue(dev); - MOD_INC_USE_COUNT; return 0; } else @@ -341,7 +340,6 @@ } #endif free_irq(dev->irq,dev); - MOD_DEC_USE_COUNT; return 0; } @@ -522,6 +520,7 @@ dev->set_multicast_list = set_multicast_list; ether_setup(dev); + SET_MODULE_OWNER(dev); return 0; /* everything is OK */ } diff -x'*.o' -x'.*' -x'*.ko' -ur linux-2.5.56/drivers/net/pcnet32.c linux-2.5.x/drivers/net/pcnet32.c --- linux-2.5.56/drivers/net/pcnet32.c 2003-01-10 12:11:40.000000000 -0800 +++ linux-2.5.x/drivers/net/pcnet32.c 2003-01-12 21:29:39.000000000 -0800 @@ -805,6 +805,7 @@ /* Fill in the generic fields of the device structure. */ register_netdev(dev); printk(KERN_INFO "%s: registered as %s\n",dev->name, lp->name); + SET_MODULE_OWNER(dev); cards_found++; return 0; } @@ -933,9 +934,6 @@ dev->name, i, (u32) (lp->dma_addr + offsetof(struct pcnet32_private, init_block)), lp->a.read_csr(ioaddr, 0)); - - MOD_INC_USE_COUNT; - return 0; /* Always succeed */ } @@ -1429,8 +1427,6 @@ lp->tx_dma_addr[i] = 0; } - MOD_DEC_USE_COUNT; - return 0; } diff -x'*.o' -x'.*' -x'*.ko' -ur linux-2.5.56/drivers/net/sk98lin/skge.c linux-2.5.x/drivers/net/sk98lin/skge.c --- linux-2.5.56/drivers/net/sk98lin/skge.c 2003-01-10 12:11:25.000000000 -0800 +++ linux-2.5.x/drivers/net/sk98lin/skge.c 2003-01-12 19:30:05.000000000 -0800 @@ -376,17 +376,6 @@ static uintptr_t RxQueueAddr[SK_MAX_MACS] = {0x400, 0x480}; - -void proc_fill_inode(struct inode *inode, int fill) -{ - if (fill) - MOD_INC_USE_COUNT; - else - MOD_DEC_USE_COUNT; -} - - - /***************************************************************************** * * skge_probe - find all SK-98xx adapters @@ -447,6 +436,7 @@ "structure!\n"); break; } + SET_MODULE_OWNER(dev); pNet = dev->priv; pNet->pAC = kmalloc(sizeof(SK_AC), GFP_KERNEL); @@ -1604,8 +1594,6 @@ pAC->MaxPorts++; pNet->Up = 1; - MOD_INC_USE_COUNT; - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeOpen suceeded\n")); @@ -1705,7 +1693,6 @@ pAC->MaxPorts--; pNet->Up = 0; - MOD_DEC_USE_COUNT; return (0); } /* SkGeClose */ diff -x'*.o' -x'.*' -x'*.ko' -ur linux-2.5.56/drivers/net/sk98lin/skproc.c linux-2.5.x/drivers/net/sk98lin/skproc.c --- linux-2.5.56/drivers/net/sk98lin/skproc.c 2003-01-10 12:11:21.000000000 -0800 +++ linux-2.5.x/drivers/net/sk98lin/skproc.c 2003-01-12 21:13:43.000000000 -0800 @@ -54,7 +54,6 @@ //#define SPECIAL 32 /* 0x */ #define LARGE 64 -extern void proc_fill_inode(struct inode *inode, int fill); extern char * SkNumber(char * str, long long num, int base, int size, int precision ,int type); int proc_read(char *buffer, diff -x'*.o' -x'.*' -x'*.ko' -ur linux-2.5.56/drivers/net/tulip/de4x5.c linux-2.5.x/drivers/net/tulip/de4x5.c --- linux-2.5.56/drivers/net/tulip/de4x5.c 2003-01-10 12:11:19.000000000 -0800 +++ linux-2.5.x/drivers/net/tulip/de4x5.c 2003-01-12 19:29:36.000000000 -0800 @@ -1361,6 +1361,7 @@ /* Fill in the generic fields of the device structure. */ ether_setup(dev); + SET_MODULE_OWNER(dev); /* Let the adapter sleep to save power */ yawn(dev, SLEEP); @@ -1434,8 +1435,6 @@ printk("\tsigr: 0x%08x\n", inl(DE4X5_SIGR)); } - MOD_INC_USE_COUNT; - return status; } @@ -1925,8 +1924,6 @@ de4x5_free_rx_buffs(dev); de4x5_free_tx_buffs(dev); - MOD_DEC_USE_COUNT; - /* Put the adapter to sleep to save power */ yawn(dev, SLEEP); - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html