diff mbox

[net-next] vcan: convert to net_device_ops

Message ID 4946C419.7040404@hartkopp.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Oliver Hartkopp Dec. 15, 2008, 8:54 p.m. UTC
vcan: convert to net_device_ops

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
CC: Stephen Hemminger <shemminger@vyatta.com>
---

This patch converts the virtual CAN driver vcan to use net_device_ops.
It's functionally tested.

Regards,
Oliver

Comments

David Miller Dec. 16, 2008, 9:42 a.m. UTC | #1
From: Oliver Hartkopp <oliver@hartkopp.net>
Date: Mon, 15 Dec 2008 21:54:49 +0100

> vcan: convert to net_device_ops
> 
> Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
> CC: Stephen Hemminger <shemminger@vyatta.com>

Applied, thanks Oliver.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index 103f0f1..f127ec9 100644
--- a/drivers/net/can/vcan.c
+++ b/drivers/net/can/vcan.c
@@ -128,6 +128,10 @@  static int vcan_tx(struct sk_buff *skb, struct net_device *dev)
 	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)
 {
 	dev->type              = ARPHRD_CAN;
@@ -141,7 +145,7 @@  static void vcan_setup(struct net_device *dev)
 	if (echo)
 		dev->flags |= IFF_ECHO;
 
-	dev->hard_start_xmit   = vcan_tx;
+	dev->netdev_ops        = &vcan_netdev_ops;
 	dev->destructor        = free_netdev;
 }