From patchwork Wed Nov 21 13:23:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200731 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 0C95C2C0097 for ; Thu, 22 Nov 2012 00:32:16 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F09564A14A; Wed, 21 Nov 2012 14:30:50 +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 dHjRmvf43km4; Wed, 21 Nov 2012 14:30:50 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 79F104A17F; Wed, 21 Nov 2012 14:27:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 582DB4A058 for ; Wed, 21 Nov 2012 14:25:18 +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 9VM2dppZ-cMv for ; Wed, 21 Nov 2012 14:25:14 +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-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id 4E5184A0B0 for ; Wed, 21 Nov 2012 14:24:34 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id a1so2241656eaa.3 for ; Wed, 21 Nov 2012 05:24:34 -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=BcUTsRDRetJbLVXms2RGGugoZse/64tBJ9G+qyrzpLI=; b=v+Mm0HtteGsWF8Uzzv0e1hg1TtT04Ih0ba60oGFa9Hb02YrBauxjUzfyBcwSYteVLM iQGwtXX/uZa/JQm0GokV/GCpdHXpqkJDY6xZ76s1Gy/uPQ1nSsrMYSBnTUsTF9R2K7FP 4kWfk2nR5/mQCYFXTMAjD0H6ZAR8+n6NbZXfalL3HYYA+e9HNWtKKPHCzoh1SLfBI6wL Gmw1k9NZ+fNDALObzH8zio2AEM8Gs1J4GsttFnjhPXMalkjK+oTXm5zUoed2IBDGuL7j HtCrTzluGSF/TWwdnv2Z0rPrOhv4GB0wLTrCNDqvgaQDbOftKeXx6zCcWWtDFKODa+Nz /sZg== Received: by 10.14.223.199 with SMTP id v47mr45704473eep.45.1353504274206; Wed, 21 Nov 2012 05:24:34 -0800 (PST) Received: from tapir ([2001:1ab0:b101::1003]) by mx.google.com with ESMTPS id o47sm179724eem.11.2012.11.21.05.24.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:24:33 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id AFA1F4637E1; Wed, 21 Nov 2012 14:24:21 +0100 (CET) From: Tomas Hlavacek To: u-boot@lists.denx.de Date: Wed, 21 Nov 2012 14:23:43 +0100 Message-Id: <1353504238-11277-53-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 52/67] net: mpc8260_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 --- arch/powerpc/cpu/mpc8260/ether_fcc.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c index 6b78235..c8dbc66 100644 --- a/arch/powerpc/cpu/mpc8260/ether_fcc.c +++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c @@ -372,6 +372,13 @@ static void fec_halt(struct eth_device* dev) ~(FCC_GFMR_ENT | FCC_GFMR_ENR); } +static struct eth_ops fec_ops = { + .init = fec_init, + .halt = fec_halt, + .send = fec_send, + .recv = fec_recv +}; + int fec_initialize(bd_t *bis) { struct eth_device* dev; @@ -385,10 +392,7 @@ int fec_initialize(bd_t *bis) sprintf(dev->name, "FCC%d", ether_fcc_info[i].ether_index + 1); dev->priv = ðer_fcc_info[i]; - dev->eo->init = fec_init; - dev->eo->halt = fec_halt; - dev->eo->send = fec_send; - dev->eo->recv = fec_recv; + dev->eo = &fec_ops; eth_register(dev);