From patchwork Mon Dec 15 20:54:49 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Hartkopp X-Patchwork-Id: 14122 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id C7C1BDDF67 for ; Tue, 16 Dec 2008 07:55:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756798AbYLOUyy (ORCPT ); Mon, 15 Dec 2008 15:54:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752946AbYLOUyx (ORCPT ); Mon, 15 Dec 2008 15:54:53 -0500 Received: from mo-p00-ob.rzone.de ([81.169.146.162]:32067 "EHLO mo-p00-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbYLOUyx (ORCPT ); Mon, 15 Dec 2008 15:54:53 -0500 X-RZG-CLASS-ID: mo00 X-RZG-AUTH: :I2ANY0W6W/eA95XfH/xfO6gOxLxTty/udEMngcJ/VAKW226lDNJVyuUJJTI/MLgx Received: from [192.168.11.10] (p5B22FBB5.dip.t-dialin.net [91.34.251.181]) by post.strato.de (mrclete mo33) (RZmta 18.3) with ESMTP id c01851kBFJwbuL ; Mon, 15 Dec 2008 21:54:48 +0100 (MET) Message-ID: <4946C419.7040404@hartkopp.net> Date: Mon, 15 Dec 2008 21:54:49 +0100 From: Oliver Hartkopp User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) MIME-Version: 1.0 To: David Miller CC: Stephen Hemminger , Linux Netdev List Subject: [PATCH net-next] vcan: convert to net_device_ops Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org vcan: convert to net_device_ops Signed-off-by: Oliver Hartkopp CC: Stephen Hemminger --- This patch converts the virtual CAN driver vcan to use net_device_ops. It's functionally tested. Regards, Oliver 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; }