netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <oliver@hartkopp.net>
To: David Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: [PATCH net-next] vcan: convert to net_device_ops
Date: Mon, 15 Dec 2008 21:54:49 +0100	[thread overview]
Message-ID: <4946C419.7040404@hartkopp.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

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



[-- Attachment #2: vcan_netdev_ops.patch --]
[-- Type: text/x-patch, Size: 677 bytes --]

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;
 }
 

             reply	other threads:[~2008-12-15 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 20:54 Oliver Hartkopp [this message]
2008-12-16  9:42 ` [PATCH net-next] vcan: convert to net_device_ops David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4946C419.7040404@hartkopp.net \
    --to=oliver@hartkopp.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).