From patchwork Fri Mar 27 01:11:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 25205 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 855B1DDD1C for ; Fri, 27 Mar 2009 12:32:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763222AbZC0BcE (ORCPT ); Thu, 26 Mar 2009 21:32:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763256AbZC0BcB (ORCPT ); Thu, 26 Mar 2009 21:32:01 -0400 Received: from suva.vyatta.com ([76.74.103.44]:49180 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763241AbZC0BcA (ORCPT ); Thu, 26 Mar 2009 21:32:00 -0400 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id n2R1VmhD017415; Thu, 26 Mar 2009 18:31:48 -0700 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id n2R1VScs017393; Thu, 26 Mar 2009 18:31:28 -0700 Message-Id: <20090327011256.405174887@linux-foundation.org> User-Agent: quilt/0.47-1 Date: Thu, 26 Mar 2009 18:11:34 -0700 From: Stephen Hemminger To: David Miller Cc: netdev@vger.kernel.org Subject: [patch 20/30] netdev: convert eexpress to net_device_ops References: <20090327011114.169107105@linux-foundation.org> Content-Disposition: inline; filename=eexpress.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/eexpress.c 2009-03-21 12:36:56.000000000 -0700 +++ b/drivers/net/eexpress.c 2009-03-26 16:15:08.615344476 -0700 @@ -1043,6 +1043,17 @@ static void eexp_hw_tx_pio(struct net_de lp->last_tx = jiffies; } +static const struct net_device_ops eexp_netdev_ops = { + .ndo_open = eexp_open, + .ndo_stop = eexp_close, + .ndo_start_xmit = eexp_xmit, + .ndo_set_multicast_list = eexp_set_multicast, + .ndo_tx_timeout = eexp_timeout, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, +}; + /* * Sanity check the suspected EtherExpress card * Read hardware address, reset card, size memory and initialize buffer @@ -1163,11 +1174,7 @@ static int __init eexp_hw_probe(struct n lp->rx_buf_start = TX_BUF_START + (lp->num_tx_bufs*TX_BUF_SIZE); lp->width = buswidth; - dev->open = eexp_open; - dev->stop = eexp_close; - dev->hard_start_xmit = eexp_xmit; - dev->set_multicast_list = &eexp_set_multicast; - dev->tx_timeout = eexp_timeout; + dev->netdev_ops = &eexp_netdev_ops; dev->watchdog_timeo = 2*HZ; return register_netdev(dev);