From patchwork Wed Nov 21 13:22:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200689 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 37EB02C009A for ; Thu, 22 Nov 2012 00:25:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B8674A058; Wed, 21 Nov 2012 14:25:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x9iXKcn1EiLy; Wed, 21 Nov 2012 14:25:20 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 475524A096; Wed, 21 Nov 2012 14:24:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40DB94A037 for ; Wed, 21 Nov 2012 14:24:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15u52H1k1rMl for ; Wed, 21 Nov 2012 14:24:23 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by theia.denx.de (Postfix) with ESMTPS id EC5EA4A02D for ; Wed, 21 Nov 2012 14:24:22 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id b47so4433757eek.3 for ; Wed, 21 Nov 2012 05:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=EB97nkyoBy2pm2M7wbkESYhIzjMuUsnQKzC1QNSxJj4=; b=raazVnmidWJ1ahhHfLqe/HYhpnUXugHPt3nBMMW4Nk8ah746NxstL3GBU8ThHSl5gb NPlwWVg68hWIND9KQAQdF+m4/WKyFLiupFMl97pRRQpdzkrtZfh/lYx1itsUgMoqi5CK QghIJxpQXJjg2yTrCaw6VX50Ainbpan8RC4wCJSEsNwXd2CKbJ/9wIGDfzKVOGEA+On8 LTXBnypDZ72k5+BzwanUkWfaCrZyOM6rzbZvk+1MSUWlMFOrFKx1P66M5EVmIjThej1W j74zahxDjcWSAFukk6mtCN+01TCBx7vLJ4yVqQH6jmib4fiqklWc9btlpSUhiEDBFjJ0 xSEQ== Received: by 10.14.211.135 with SMTP id w7mr37699017eeo.4.1353504262838; Wed, 21 Nov 2012 05:24:22 -0800 (PST) Received: from tapir ([89.177.24.237]) by mx.google.com with ESMTPS id e1sm218551eem.3.2012.11.21.05.24.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:24:22 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id 51691463240; Wed, 21 Nov 2012 14:24:20 +0100 (CET) From: Tomas Hlavacek To: u-boot@lists.denx.de Date: Wed, 21 Nov 2012 14:22:56 +0100 Message-Id: <1353504238-11277-6-git-send-email-tmshlvck@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353504238-11277-1-git-send-email-tmshlvck@gmail.com> References: <1351876722-5183-1-git-send-email-tmshlvck@gmail.com> <1353504238-11277-1-git-send-email-tmshlvck@gmail.com> Cc: marex@denx.de Subject: [U-Boot] [PATCH v2 05/67] net: armada100_fec: Pull out init of struct eth_ops X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add static struct eth_ops and set ops function pointers statically. Remove setting eth_ops members dynamically. This is a step toward converting the driver for DM. Signed-off-by: Tomas Hlavacek --- drivers/net/armada100_fec.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c index f256381..d826e11 100644 --- a/drivers/net/armada100_fec.c +++ b/drivers/net/armada100_fec.c @@ -678,6 +678,13 @@ static int armdfec_recv(struct eth_device *dev) return 0; } +static struct eth_ops armada100_fec_ops = { + .init = armdfec_init, + .halt = armdfec_halt, + .send = armdfec_send, + .recv = armdfec_recv +}; + int armada100_fec_register(unsigned long base_addr) { struct armdfec_device *darmdfec; @@ -718,10 +725,7 @@ int armada100_fec_register(unsigned long base_addr) /* must be less than sizeof(dev->name) */ strcpy(dev->name, "armd-fec0"); - dev->eo->init = armdfec_init; - dev->eo->halt = armdfec_halt; - dev->eo->send = armdfec_send; - dev->eo->recv = armdfec_recv; + dev->eo = &armada100_fec_ops; eth_register(dev);