Commit 5ad258c0 authored by Oliver Hartkopp's avatar Oliver Hartkopp Committed by David S. Miller

vcan: convert to net_device_ops

Signed-off-by: default avatarOliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ffcebb16
...@@ -128,6 +128,10 @@ static int vcan_tx(struct sk_buff *skb, struct net_device *dev) ...@@ -128,6 +128,10 @@ static int vcan_tx(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
static const struct net_device_ops vcan_netdev_ops = {
.ndo_start_xmit = vcan_tx,
};
static void vcan_setup(struct net_device *dev) static void vcan_setup(struct net_device *dev)
{ {
dev->type = ARPHRD_CAN; dev->type = ARPHRD_CAN;
...@@ -141,7 +145,7 @@ static void vcan_setup(struct net_device *dev) ...@@ -141,7 +145,7 @@ static void vcan_setup(struct net_device *dev)
if (echo) if (echo)
dev->flags |= IFF_ECHO; dev->flags |= IFF_ECHO;
dev->hard_start_xmit = vcan_tx; dev->netdev_ops = &vcan_netdev_ops;
dev->destructor = free_netdev; dev->destructor = free_netdev;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment