X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Ftulip%2Fde4x5.c;h=5160ef2daf75588bc3d13d06feee9a615b6b2561;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=05e8947f9047d4ea8eec364682ecae3e238fbb49;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 05e8947f9..5160ef2da 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -467,8 +467,8 @@ #include #include #include +#include -#include #include #include #include @@ -1141,7 +1141,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) lp->asBitValid = TRUE; lp->timeout = -1; lp->gendev = gendev; - lp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->lock); init_timer(&lp->timer); de4x5_parse_params(dev); @@ -1316,7 +1316,7 @@ de4x5_open(struct net_device *dev) ** Re-initialize the DE4X5... */ status = de4x5_init(dev); - lp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&lp->lock); lp->state = OPEN; de4x5_dbg_open(dev); @@ -2242,8 +2242,8 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev, return -ENODEV; /* Ok, the device seems to be for us. */ - if (pci_enable_device (pdev)) - return -ENODEV; + if ((error = pci_enable_device (pdev))) + return error; if (!(dev = alloc_etherdev (sizeof (struct de4x5_private)))) { error = -ENOMEM; @@ -5089,7 +5089,7 @@ mii_get_phy(struct net_device *dev) lp->useMII = TRUE; /* Search the MII address space for possible PHY devices */ - for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(++i)%DE4X5_MAX_MII) { + for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) { lp->phy[lp->active].addr = i; if (i==0) n++; /* Count cycles */ while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */