Skip to content

Commit

Permalink
sunqe: Convert to net_device_ops.
Browse files Browse the repository at this point in the history
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 23, 2009
1 parent c767071 commit ecd4137
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions drivers/net/sunqe.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,14 @@ static struct sunqec * __devinit get_qec(struct of_device *child)
return NULL;
}

static const struct net_device_ops qec_ops = {
.ndo_open = qe_open,
.ndo_stop = qe_close,
.ndo_start_xmit = qe_start_xmit,
.ndo_set_multicast_list = qe_set_multicast,
.ndo_tx_timeout = qe_tx_timeout,
};

static int __devinit qec_ether_init(struct of_device *op)
{
static unsigned version_printed;
Expand Down Expand Up @@ -893,15 +901,11 @@ static int __devinit qec_ether_init(struct of_device *op)

SET_NETDEV_DEV(dev, &op->dev);

dev->open = qe_open;
dev->stop = qe_close;
dev->hard_start_xmit = qe_start_xmit;
dev->set_multicast_list = qe_set_multicast;
dev->tx_timeout = qe_tx_timeout;
dev->watchdog_timeo = 5*HZ;
dev->irq = op->irqs[0];
dev->dma = 0;
dev->ethtool_ops = &qe_ethtool_ops;
dev->netdev_ops = &qec_ops;

res = register_netdev(dev);
if (res)
Expand Down

0 comments on commit ecd4137

Please sign in to comment.