diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-09 13:28:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-11 05:53:54 -0400 |
commit | 9aa7b30ce36f3bfa03b878296d55e0551682de15 (patch) | |
tree | 9dfe12fb67fa5805812c16ff8f8608c9fee22ffa /drivers | |
parent | 531c6804a4299663c7fa798ebfa9dbf843e91e0e (diff) |
ep93xx_eth: convert to net_device_ops
Also make ep93xx_dev_alloc static.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/arm/ep93xx_eth.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index cc7708775da0..41736772c1dd 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -770,7 +770,18 @@ static struct ethtool_ops ep93xx_ethtool_ops = { | |||
770 | .get_link = ep93xx_get_link, | 770 | .get_link = ep93xx_get_link, |
771 | }; | 771 | }; |
772 | 772 | ||
773 | struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data) | 773 | static const struct net_device_ops ep93xx_netdev_ops = { |
774 | .ndo_open = ep93xx_open, | ||
775 | .ndo_stop = ep93xx_close, | ||
776 | .ndo_start_xmit = ep93xx_xmit, | ||
777 | .ndo_get_stats = ep93xx_get_stats, | ||
778 | .ndo_do_ioctl = ep93xx_ioctl, | ||
779 | .ndo_validate_addr = eth_validate_addr, | ||
780 | .ndo_change_mtu = eth_change_mtu, | ||
781 | .ndo_set_mac_address = eth_mac_addr, | ||
782 | }; | ||
783 | |||
784 | static struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data) | ||
774 | { | 785 | { |
775 | struct net_device *dev; | 786 | struct net_device *dev; |
776 | 787 | ||
@@ -780,12 +791,8 @@ struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data) | |||
780 | 791 | ||
781 | memcpy(dev->dev_addr, data->dev_addr, ETH_ALEN); | 792 | memcpy(dev->dev_addr, data->dev_addr, ETH_ALEN); |
782 | 793 | ||
783 | dev->get_stats = ep93xx_get_stats; | ||
784 | dev->ethtool_ops = &ep93xx_ethtool_ops; | 794 | dev->ethtool_ops = &ep93xx_ethtool_ops; |
785 | dev->hard_start_xmit = ep93xx_xmit; | 795 | dev->netdev_ops = &ep93xx_netdev_ops; |
786 | dev->open = ep93xx_open; | ||
787 | dev->stop = ep93xx_close; | ||
788 | dev->do_ioctl = ep93xx_ioctl; | ||
789 | 796 | ||
790 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; | 797 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; |
791 | 798 | ||