From patchwork Wed Nov 21 13:23:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200739 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 3B3532C0093 for ; Thu, 22 Nov 2012 00:33:41 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AF1734A197; Wed, 21 Nov 2012 14:31:48 +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 l2ENc8fHrh8y; Wed, 21 Nov 2012 14:31:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E18134A1AF; Wed, 21 Nov 2012 14:27:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 25FE04A090 for ; Wed, 21 Nov 2012 14:25:29 +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 msUzF84wdgI0 for ; Wed, 21 Nov 2012 14:25:28 +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 225A14A03A for ; Wed, 21 Nov 2012 14:24:37 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id a1so2241703eaa.3 for ; Wed, 21 Nov 2012 05:24:37 -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=eF1OK2VcaQzl7Oj8yUTiHZzqra9VNLd4MCf4dPbViSM=; b=hR+wnPWXp7zvQxBvG5ZsJdbOITOeYX7A/WZKnOj7yeKB8WvSGcOUKWUjSzDIniKwYs TdvEa/cztf9ni4xtFyye5BYZsjVmjx8o+pm4Q1Oxu0EkYd1OLmfXx6395svOI8+kqfpb 0Vb+1nohPLyIa6GQQyxh7g/nx7TRWVqhYBC9klmdX3Vkn8rPXgQmQrFaPflcrTAFfIPH IlNdHhm1Fc4PWr+x73PZUMMRvLwe6KGOlOqLwVGgEuC9o0/zUNTdhhKYOO8mmWS/4tBl QEBhklfYg9npER7MHRP2RUQdfsf2F4Zt09VE9qv2cJSaWGHglmXD/QgCfurbcGskai6G PyNQ== Received: by 10.14.194.71 with SMTP id l47mr45108241een.6.1353504276960; Wed, 21 Nov 2012 05:24:36 -0800 (PST) Received: from tapir ([89.177.24.237]) by mx.google.com with ESMTPS id e1sm219602eem.3.2012.11.21.05.24.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:24:35 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id B67594637E2; 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:44 +0100 Message-Id: <1353504238-11277-54-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 53/67] net: mpc8260_scc: 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_scc.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc8260/ether_scc.c b/arch/powerpc/cpu/mpc8260/ether_scc.c index e56bfdf..5afe905 100644 --- a/arch/powerpc/cpu/mpc8260/ether_scc.c +++ b/arch/powerpc/cpu/mpc8260/ether_scc.c @@ -364,6 +364,13 @@ static void sec_restart(void) } #endif +static struct eth_ops sec_ops = { + .init = sec_init, + .halt = sec_halt, + .send = sec_send, + .recv = sec_rx +}; + int mpc82xx_scc_enet_initialize(bd_t *bis) { struct eth_device *dev; @@ -372,10 +379,7 @@ int mpc82xx_scc_enet_initialize(bd_t *bis) memset(dev, 0, sizeof *dev); sprintf(dev->name, "SCC"); - dev->eo->init = sec_init; - dev->eo->halt = sec_halt; - dev->eo->send = sec_send; - dev->eo->recv = sec_rx; + dev->eo = &sec_ops; eth_register(dev);