diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/net/tc35815.c linux-2.5/drivers/net/tc35815.c --- bk-linus/drivers/net/tc35815.c 2002-11-21 02:16:31.000000000 +0000 +++ linux-2.5/drivers/net/tc35815.c 2002-11-21 17:59:32.000000000 +0000 @@ -539,10 +539,15 @@ static int __init tc35815_probe1(struct struct net_device *dev; /* Allocate a new 'dev' if needed. */ - dev = init_etherdev(NULL, 0); + dev = init_etherdev(NULL, sizeof(struct tc35815_local)); if (dev == NULL) return -ENOMEM; + /* + * init_etherdev allocs and zeros dev->priv + */ + lp = dev->priv; + if (tc35815_debug && version_printed++ == 0) printk(KERN_DEBUG "%s", version); @@ -574,17 +579,7 @@ static int __init tc35815_probe1(struct printk("\n"); /* Initialize the device structure. */ - if (dev->priv == NULL) { - dev->priv = kmalloc(sizeof(struct tc35815_local), GFP_KERNEL); - if (dev->priv == NULL) - return -ENODEV; - } - lp = dev->priv; - lp->pdev = pdev; - - memset(lp, 0, sizeof(struct tc35815_local)); - lp->next_module = root_tc35815_dev; root_tc35815_dev = dev;