From patchwork Fri Jan 9 23:01:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 17637 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 CCED547640 for ; Sat, 10 Jan 2009 10:18:24 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755251AbZAIXSS (ORCPT ); Fri, 9 Jan 2009 18:18:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755094AbZAIXSP (ORCPT ); Fri, 9 Jan 2009 18:18:15 -0500 Received: from suva.vyatta.com ([76.74.103.44]:42196 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145AbZAIXR5 (ORCPT ); Fri, 9 Jan 2009 18:17:57 -0500 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id n09NHtpd017116; Fri, 9 Jan 2009 15:17:55 -0800 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id n09NHtGv017115; Fri, 9 Jan 2009 15:17:55 -0800 Message-Id: <20090109230138.187195860@linux-foundation.org> User-Agent: quilt/0.47-1 Date: Fri, 09 Jan 2009 15:01:17 -0800 From: Stephen Hemminger To: David Miller Cc: netdev@vger.kernel.org Subject: [patch 20/45] 3c527: convert to net_device_ops References: <20090109230057.575650817@linux-foundation.org> Content-Disposition: inline; filename=3c527.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/3c527.c 2009-01-08 10:27:52.851007199 -0800 +++ b/drivers/net/3c527.c 2009-01-08 10:29:08.786256455 -0800 @@ -288,6 +288,18 @@ struct net_device *__init mc32_probe(int return ERR_PTR(-ENODEV); } +static const struct net_device_ops netdev_ops = { + .ndo_open = mc32_open, + .ndo_stop = mc32_close, + .ndo_start_xmit = mc32_send_packet, + .ndo_get_stats = mc32_get_stats, + .ndo_set_multicast_list = mc32_set_multicast_list, + .ndo_tx_timeout = mc32_timeout, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, +}; + /** * mc32_probe1 - Check a given slot for a board and test the card * @dev: Device structure to fill in @@ -518,12 +530,7 @@ static int __init mc32_probe1(struct net printk("%s: Firmware Rev %d. %d RX buffers, %d TX buffers. Base of 0x%08X.\n", dev->name, lp->exec_box->data[12], lp->rx_len, lp->tx_len, lp->base); - dev->open = mc32_open; - dev->stop = mc32_close; - dev->hard_start_xmit = mc32_send_packet; - dev->get_stats = mc32_get_stats; - dev->set_multicast_list = mc32_set_multicast_list; - dev->tx_timeout = mc32_timeout; + dev->netdev_ops = &netdev_ops; dev->watchdog_timeo = HZ*5; /* Board does all the work */ dev->ethtool_ops = &netdev_ethtool_ops;