USB: fix locking in idmouse
[safe/jmp/linux-2.6] / drivers / net / smc91x.c
index fe28d27..7da7589 100644 (file)
@@ -173,49 +173,6 @@ MODULE_LICENSE("GPL");
  */
 #define MII_DELAY              1
 
-/* store this information for the driver.. */
-struct smc_local {
-       /*
-        * If I have to wait until memory is available to send a
-        * packet, I will store the skbuff here, until I get the
-        * desired memory.  Then, I'll send it out and free it.
-        */
-       struct sk_buff *pending_tx_skb;
-       struct tasklet_struct tx_task;
-
-       /* version/revision of the SMC91x chip */
-       int     version;
-
-       /* Contains the current active transmission mode */
-       int     tcr_cur_mode;
-
-       /* Contains the current active receive mode */
-       int     rcr_cur_mode;
-
-       /* Contains the current active receive/phy mode */
-       int     rpc_cur_mode;
-       int     ctl_rfduplx;
-       int     ctl_rspeed;
-
-       u32     msg_enable;
-       u32     phy_type;
-       struct mii_if_info mii;
-
-       /* work queue */
-       struct work_struct phy_configure;
-       struct net_device *dev;
-       int     work_pending;
-
-       spinlock_t lock;
-
-#ifdef SMC_USE_PXA_DMA
-       /* DMA needs the physical address of the chip */
-       u_long physaddr;
-#endif
-       void __iomem *base;
-       void __iomem *datacs;
-};
-
 #if SMC_DEBUG > 0
 #define DBG(n, args...)                                        \
        do {                                            \
@@ -1822,9 +1779,10 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
 {
        struct smc_local *lp = netdev_priv(dev);
        static int version_printed = 0;
-       int i, retval;
+       int retval;
        unsigned int val, revision_register;
        const char *version_string;
+       DECLARE_MAC_BUF(mac);
 
        DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
 
@@ -2014,10 +1972,8 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
                               "set using ifconfig\n", dev->name);
                } else {
                        /* Print the Ethernet address */
-                       printk("%s: Ethernet addr: ", dev->name);
-                       for (i = 0; i < 5; i++)
-                               printk("%2.2x:", dev->dev_addr[i]);
-                       printk("%2.2x\n", dev->dev_addr[5]);
+                       printk("%s: Ethernet addr: %s\n",
+                              dev->name, print_mac(mac, dev->dev_addr));
                }
 
                if (lp->phy_type == 0) {
@@ -2216,17 +2172,19 @@ static int smc_drv_probe(struct platform_device *pdev)
                goto out_release_attrib;
        }
 
-       platform_set_drvdata(pdev, ndev);
-       ret = smc_probe(ndev, addr);
-       if (ret != 0)
-               goto out_iounmap;
 #ifdef SMC_USE_PXA_DMA
-       else {
+       {
                struct smc_local *lp = netdev_priv(ndev);
+               lp->device = &pdev->dev;
                lp->physaddr = res->start;
        }
 #endif
 
+       platform_set_drvdata(pdev, ndev);
+       ret = smc_probe(ndev, addr);
+       if (ret != 0)
+               goto out_iounmap;
+
        smc_request_datacs(pdev, ndev);
 
        return 0;