X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fdeclance.c;h=bbccd741cdbffb12dc804415e53b88778f1a5933;hb=363e065c02b1273364d5356711a83e7f548fc0c8;hp=2038ca7e49ceb7dc6ad702c6ce75acbe2d0959d8;hpb=0d1782144e81faf6203075c5fcd0a2f0db91af5b;p=pandora-kernel.git diff --git a/drivers/net/declance.c b/drivers/net/declance.c index 2038ca7e49ce..bbccd741cdbf 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c @@ -1,4 +1,4 @@ -/* +/* * Lance ethernet driver for the MIPS processor based * DECstation family * @@ -158,9 +158,9 @@ MODULE_LICENSE("GPL"); /* The DS2000/3000 have a linear 64 KB buffer. - * The PMAD-AA has 128 kb buffer on-board. + * The PMAD-AA has 128 kb buffer on-board. * - * The IOASIC LANCE devices use a shared memory region. This region as seen + * The IOASIC LANCE devices use a shared memory region. This region as seen * from the CPU is (max) 128 KB long and has to be on an 128 KB boundary. * The LANCE sees this as a 64 KB long continuous memory region. * @@ -703,8 +703,8 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id, return IRQ_HANDLED; } -static irqreturn_t -lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t lance_interrupt(const int irq, void *dev_id, + struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct lance_private *lp = netdev_priv(dev); @@ -882,7 +882,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) skblen = skb->len; len = skblen; - + if (len < ETH_ZLEN) { if (skb_padto(skb, ETH_ZLEN)) return 0; @@ -1253,7 +1253,7 @@ static int __init dec_lance_init(const int type, const int slot) return 0; err_out_free_dev: - kfree(dev); + free_netdev(dev); err_out: return ret; @@ -1299,6 +1299,7 @@ static void __exit dec_lance_cleanup(void) while (root_lance_dev) { struct net_device *dev = root_lance_dev; struct lance_private *lp = netdev_priv(dev); + unregister_netdev(dev); #ifdef CONFIG_TC if (lp->slot >= 0)