From patchwork Thu Apr 9 14:46:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25781 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 04E1FDDED7 for ; Fri, 10 Apr 2009 00:48:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934332AbZDIOrJ (ORCPT ); Thu, 9 Apr 2009 10:47:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933705AbZDIOrH (ORCPT ); Thu, 9 Apr 2009 10:47:07 -0400 Received: from rv-out-0506.google.com ([209.85.198.239]:24542 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934531AbZDIOrE (ORCPT ); Thu, 9 Apr 2009 10:47:04 -0400 Received: by rv-out-0506.google.com with SMTP id f9so645315rvb.1 for ; Thu, 09 Apr 2009 07:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=3oFNQL+HfPmYMaKZbQS5wuWTClKBsokKbQqloWvu93k=; b=CDpgR9k3k9InbegFaGBY+/wGt4LJszbF2HpsGNhgOgXIMtRQkvWk3AJsmlP4Zi6jlV pzWWc8P/AR/5JcVD2JQIfln2jk8JLhGAp/PAEiCsq0a1Q9CJaTuPGert8CfVC3x0Qxpq wQnwdQtbwOqDEOaJEKqfzXZBGDLiUCvzqiCYU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=TM2KhlL4Xm3apgGaH9EXeG8Vl+GQsrTEDuoXBp/36omlBnyATI3gntpXvFhzUhW8Ks 7J7znwsanwJuJecgmHQe4H7J0joQPpv3XqIpR4S5oAatrmWnm+2JbPYcgncZX1IcJqK5 L+WvTXa7l593RxfQZE6MWtxWtLqtdeh/qvo2E= Received: by 10.115.108.1 with SMTP id k1mr1437124wam.122.1239288421784; Thu, 09 Apr 2009 07:47:01 -0700 (PDT) Received: from orion ([91.78.23.81]) by mx.google.com with ESMTPS id v39sm223367wah.5.2009.04.09.07.46.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Apr 2009 07:47:00 -0700 (PDT) Date: Thu, 9 Apr 2009 18:46:53 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org, David Miller , linux-next@vger.kernel.org, Subrata Modak , Linuxppc-dev Subject: [PATCH] fs_enet: convert to netdev_ops Message-ID: <20090409144652.GA4012@orion> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Reported-by: Subrata Modak Signed-off-by: Alexander Beregalov --- drivers/net/fs_enet/fs_enet-main.c | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) -- 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 diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index b037ce9..a9cbc31 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -1019,6 +1019,22 @@ out_put_phy: #define IS_FEC(match) 0 #endif +static const struct net_device_ops fs_enet_netdev_ops = { + .ndo_open = fs_enet_open, + .ndo_stop = fs_enet_close, + .ndo_get_stats = fs_enet_get_stats, + .ndo_start_xmit = fs_enet_start_xmit, + .ndo_tx_timeout = fs_timeout, + .ndo_set_multicast_list = fs_set_multicast_list, + .ndo_do_ioctl = fs_ioctl, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, + .ndo_change_mtu = eth_change_mtu, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = fs_enet_netpoll, +#endif +}; + static int __devinit fs_enet_probe(struct of_device *ofdev, const struct of_device_id *match) { @@ -1093,22 +1109,13 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, fep->tx_ring = fpi->tx_ring; fep->rx_ring = fpi->rx_ring; - ndev->open = fs_enet_open; - ndev->hard_start_xmit = fs_enet_start_xmit; - ndev->tx_timeout = fs_timeout; + ndev->netdev_ops = &fs_enet_netdev_ops; ndev->watchdog_timeo = 2 * HZ; - ndev->stop = fs_enet_close; - ndev->get_stats = fs_enet_get_stats; - ndev->set_multicast_list = fs_set_multicast_list; -#ifdef CONFIG_NET_POLL_CONTROLLER - ndev->poll_controller = fs_enet_netpoll; -#endif if (fpi->use_napi) netif_napi_add(ndev, &fep->napi, fs_enet_rx_napi, fpi->napi_weight); ndev->ethtool_ops = &fs_ethtool_ops; - ndev->do_ioctl = fs_ioctl; init_timer(&fep->phy_timer_list);