From patchwork Fri Jan 9 23:01:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 17658 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 6C8734765C for ; Sat, 10 Jan 2009 10:19:59 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757521AbZAIXS5 (ORCPT ); Fri, 9 Jan 2009 18:18:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757396AbZAIXS4 (ORCPT ); Fri, 9 Jan 2009 18:18:56 -0500 Received: from suva.vyatta.com ([76.74.103.44]:42284 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754855AbZAIXSM (ORCPT ); Fri, 9 Jan 2009 18:18:12 -0500 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id n09NI4GR017347; Fri, 9 Jan 2009 15:18:04 -0800 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id n09NI4Lf017346; Fri, 9 Jan 2009 15:18:04 -0800 Message-Id: <20090109230139.849953696@linux-foundation.org> User-Agent: quilt/0.47-1 Date: Fri, 09 Jan 2009 15:01:39 -0800 From: Stephen Hemminger To: David Miller , klaus.kudielka@ieee.org Cc: netdev@vger.kernel.org, linux-hams@vger.kernel.org Subject: [patch 42/45] scc: convert to internal net_device_ops References: <20090109230057.575650817@linux-foundation.org> Content-Disposition: inline; filename=scc-netdev.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Stephen Hemminger --- 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 --- a/drivers/net/hamradio/scc.c 2009-01-08 08:30:11.000000000 -0800 +++ b/drivers/net/hamradio/scc.c 2009-01-08 15:23:35.000000000 -0800 @@ -1542,23 +1542,24 @@ static int scc_net_alloc(const char *nam /* * Network driver methods * */ /* ******************************************************************** */ +static const struct net_device_ops scc_netdev_ops = { + .ndo_open = scc_net_open, + .ndo_stop = scc_net_close, + .ndo_start_xmit = scc_net_tx, + .ndo_set_mac_address = scc_net_set_mac_address, + .ndo_get_stats = scc_net_get_stats, + .ndo_do_ioctl = scc_net_ioctl, +}; + /* ----> Initialize device <----- */ static void scc_net_setup(struct net_device *dev) { dev->tx_queue_len = 16; /* should be enough... */ - dev->open = scc_net_open; - dev->stop = scc_net_close; - - dev->hard_start_xmit = scc_net_tx; + dev->netdev_ops = &scc_netdev_ops; dev->header_ops = &ax25_header_ops; - dev->set_mac_address = scc_net_set_mac_address; - dev->get_stats = scc_net_get_stats; - dev->do_ioctl = scc_net_ioctl; - dev->tx_timeout = NULL; - memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN); memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);