diff options
Diffstat (limited to 'drivers/net/ethernet/ezchip/nps_enet.c')
| -rw-r--r-- | drivers/net/ethernet/ezchip/nps_enet.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c index 323340826dab..5cb478e98697 100644 --- a/drivers/net/ethernet/ezchip/nps_enet.c +++ b/drivers/net/ethernet/ezchip/nps_enet.c @@ -6,10 +6,9 @@ #include <linux/module.h> #include <linux/etherdevice.h> #include <linux/interrupt.h> -#include <linux/of_address.h> -#include <linux/of_irq.h> +#include <linux/mod_devicetable.h> #include <linux/of_net.h> -#include <linux/of_platform.h> +#include <linux/platform_device.h> #include "nps_enet.h" #define DRV_NAME "nps_mgt_enet" @@ -199,7 +198,7 @@ static int nps_enet_poll(struct napi_struct *napi, int budget) */ if (nps_enet_is_tx_pending(priv)) { nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0); - napi_reschedule(napi); + napi_schedule(napi); } } @@ -608,13 +607,12 @@ static s32 nps_enet_probe(struct platform_device *pdev) /* Get IRQ number */ priv->irq = platform_get_irq(pdev, 0); if (priv->irq < 0) { - dev_err(dev, "failed to retrieve <irq Rx-Tx> value from device tree\n"); err = -ENODEV; goto out_netdev; } - netif_napi_add(ndev, &priv->napi, nps_enet_poll, - NPS_ENET_NAPI_POLL_WEIGHT); + netif_napi_add_weight(ndev, &priv->napi, nps_enet_poll, + NPS_ENET_NAPI_POLL_WEIGHT); /* Register the driver. Should be the last thing in probe */ err = register_netdev(ndev); @@ -635,7 +633,7 @@ out_netdev: return err; } -static s32 nps_enet_remove(struct platform_device *pdev) +static void nps_enet_remove(struct platform_device *pdev) { struct net_device *ndev = platform_get_drvdata(pdev); struct nps_enet_priv *priv = netdev_priv(ndev); @@ -643,8 +641,6 @@ static s32 nps_enet_remove(struct platform_device *pdev) unregister_netdev(ndev); netif_napi_del(&priv->napi); free_netdev(ndev); - - return 0; } static const struct of_device_id nps_enet_dt_ids[] = { @@ -665,4 +661,5 @@ static struct platform_driver nps_enet_driver = { module_platform_driver(nps_enet_driver); MODULE_AUTHOR("EZchip Semiconductor"); +MODULE_DESCRIPTION("EZchip NPS Ethernet driver"); MODULE_LICENSE("GPL v2"); |
