From patchwork Sat Apr 11 17:40:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25859 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 89D17DE255 for ; Sun, 12 Apr 2009 03:41:02 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757313AbZDKRk5 (ORCPT ); Sat, 11 Apr 2009 13:40:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757246AbZDKRk4 (ORCPT ); Sat, 11 Apr 2009 13:40:56 -0400 Received: from an-out-0708.google.com ([209.85.132.246]:4523 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757214AbZDKRk4 (ORCPT ); Sat, 11 Apr 2009 13:40:56 -0400 Received: by an-out-0708.google.com with SMTP id d14so1350034and.1 for ; Sat, 11 Apr 2009 10:40:54 -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:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=FHsxbFd+9eGn3EwX4S6xM31Sk78bnjaz32YPGOr6DNE=; b=RhAJR2Livp4e674xTz1DxOKVznxtQz8xuGQxDS0zuHXrp5OBFqgjPdYTzqxt8eUE2w a0QBKmB1nYt6Qj7t0ywgVOSxI58coS/xU4Kz5nXodLFK/YPIftuIbO39+SekYJX41fYP T6Ss/+kMLx6nUd567vk8Mn58Fk49nzkm+ymz8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=edc909iPU8TEkCUQMfYvR0ME4duU4KtBxhnQicgfGFURzN203vTg/wMmM4xaYungsM 61RCML1hwrm2hEHNgoeaRScAG4TUXiqVXzc7KAVIc7Wq5c/bhuCGCeVZVsAhhaMfVsS8 jFv3ANczLXkp/4xDxJF/Q3z6TJmi51ynHiryk= Received: by 10.100.141.10 with SMTP id o10mr4769537and.36.1239471654762; Sat, 11 Apr 2009 10:40:54 -0700 (PDT) Received: from orion ([91.78.156.47]) by mx.google.com with ESMTPS id 5sm5206840ywd.50.2009.04.11.10.40.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 11 Apr 2009 10:40:54 -0700 (PDT) Date: Sat, 11 Apr 2009 21:40:49 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org Subject: [PATCH 05/11] sh_eth: convert to net_device_ops Message-ID: <20090411174049.GE16999@orion> References: <20090411173019.GA16999@orion> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090411173019.GA16999@orion> 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 Signed-off-by: Alexander Beregalov --- drivers/net/sh_eth.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 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/sh_eth.c b/drivers/net/sh_eth.c index 7b18827..3ab28bb 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -1188,6 +1188,19 @@ out: return ret; } +static const struct net_device_ops sh_eth_netdev_ops = { + .ndo_open = sh_eth_open, + .ndo_stop = sh_eth_close, + .ndo_start_xmit = sh_eth_start_xmit, + .ndo_get_stats = sh_eth_get_stats, + .ndo_set_multicast_list = sh_eth_set_multicast_list, + .ndo_tx_timeout = sh_eth_tx_timeout, + .ndo_do_ioctl = sh_eth_do_ioctl, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, + .ndo_change_mtu = eth_change_mtu, +}; + static int sh_eth_drv_probe(struct platform_device *pdev) { int ret, i, devno = 0; @@ -1240,13 +1253,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev) mdp->edmac_endian = pd->edmac_endian; /* set function */ - ndev->open = sh_eth_open; - ndev->hard_start_xmit = sh_eth_start_xmit; - ndev->stop = sh_eth_close; - ndev->get_stats = sh_eth_get_stats; - ndev->set_multicast_list = sh_eth_set_multicast_list; - ndev->do_ioctl = sh_eth_do_ioctl; - ndev->tx_timeout = sh_eth_tx_timeout; + ndev->netdev_ops = &sh_eth_netdev_ops; ndev->watchdog_timeo = TX_TIMEOUT; mdp->post_rx = POST_RX >> (devno << 1);