]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/fs_enet/fs_enet-main.c
drivers/net: Use linux/of_{device,platform}.h instead of asm
[linux-2.6-omap-h63xx.git] / drivers / net / fs_enet / fs_enet-main.c
index af869cf9ae7d7278fdae1b717431c0f7447476b3..352574a3f056ae81f260e144f10211eabf5008e4 100644 (file)
@@ -43,7 +43,7 @@
 #include <asm/uaccess.h>
 
 #ifdef CONFIG_PPC_CPM_NEW_BINDING
-#include <asm/of_platform.h>
+#include <linux/of_platform.h>
 #endif
 
 #include "fs_enet.h"
@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev)
 
        netif_stop_queue(dev);
        netif_carrier_off(dev);
-       napi_disable(&fep->napi);
+       if (fep->fpi->use_napi)
+               napi_disable(&fep->napi);
        phy_stop(fep->phydev);
 
        spin_lock_irqsave(&fep->lock, flags);
@@ -1092,7 +1093,7 @@ err:
                if (registered)
                        unregister_netdev(ndev);
 
-               if (fep != NULL) {
+               if (fep && fep->ops) {
                        (*fep->ops->free_bd)(ndev);
                        (*fep->ops->cleanup_data)(ndev);
                }
@@ -1177,7 +1178,7 @@ static int __devinit find_phy(struct device_node *np,
 
        data  = of_get_property(np, "fixed-link", NULL);
        if (data) {
-               snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
+               snprintf(fpi->bus_id, 16, "%x:%02x", 0, *data);
                return 0;
        }
 
@@ -1201,7 +1202,7 @@ static int __devinit find_phy(struct device_node *np,
        if (!data || len != 4)
                goto out_put_mdio;
 
-       snprintf(fpi->bus_id, 16, PHY_ID_FMT, res.start, *data);
+       snprintf(fpi->bus_id, 16, "%x:%02x", res.start, *data);
 
 out_put_mdio:
        of_node_put(mdionode);