From patchwork Wed Nov 21 13:23:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200754 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 69C572C007E for ; Thu, 22 Nov 2012 00:36:16 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 907914A287; Wed, 21 Nov 2012 14:35:49 +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 EzMOKHRYRaUC; Wed, 21 Nov 2012 14:35:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9BA564A2C8; Wed, 21 Nov 2012 14:34:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A6C9F4A0F0 for ; Wed, 21 Nov 2012 14:32:41 +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 UryOYwWpQF11 for ; Wed, 21 Nov 2012 14:32:41 +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 BBC754A355 for ; Wed, 21 Nov 2012 14:32:16 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id b47so4438281eek.3 for ; Wed, 21 Nov 2012 05:32:16 -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=vhK8ZsyoMWFlB28yPfH6SNrG3tYZ5nya9Rlx7v4Mwq0=; b=QFj7A57MmpY3WTivRlC+WQbEfYWT2f+6GZLECL0sElyusnv20VOAwEPLV+ONgP7rPY mGVYWsUVgL02Qa8yUvZ5/npdQ+gK+SLxNJ5NIe+Jjzx5nXo+Ko1yKn36FRnvh6iSwVcz E3+FiRJIs4Os7nDmP+gE+iV2ACvTw8BqgWwYvDK7dUDlDSpP9G7hqTVKvBDiIYuF71rT o04MjkkJyqGr05ATytnUEZqoQ6LjGpYKvEkZNe1lGz8fptG6KG9FlgkbDeLxIw/dSMo0 43jfHKTVMUbclo+BR4WQZpN5N8okkoYbMVERthq61Uo20HAf1vE4uzW1PWz98q/YI/SQ jALA== Received: by 10.14.214.133 with SMTP id c5mr45402943eep.8.1353504736129; Wed, 21 Nov 2012 05:32:16 -0800 (PST) Received: from tapir ([89.177.24.237]) by mx.google.com with ESMTPS id k2sm195945eep.15.2012.11.21.05.32.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:32:14 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id A0F464637DA; 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:41 +0100 Message-Id: <1353504238-11277-51-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 50/67] net: au1x00_eth: 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/mips/cpu/mips32/au1x00/au1x00_eth.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_eth.c b/arch/mips/cpu/mips32/au1x00/au1x00_eth.c index 2909fb3..cd4c518 100644 --- a/arch/mips/cpu/mips32/au1x00/au1x00_eth.c +++ b/arch/mips/cpu/mips32/au1x00/au1x00_eth.c @@ -283,6 +283,13 @@ static void au1x00_halt(struct eth_device* dev){ *macen = 0; } +static struct eth_ops au1x00_ops = { + .init = au1x00_init, + .halt = au1x00_halt, + .send = au1x00_send, + .recv = au1x00_recv +}; + int au1x00_enet_initialize(bd_t *bis){ struct eth_device* dev; @@ -296,10 +303,7 @@ int au1x00_enet_initialize(bd_t *bis){ sprintf(dev->name, "Au1X00 ethernet"); dev->iobase = 0; dev->priv = 0; - dev->eo->init = au1x00_init; - dev->eo->halt = au1x00_halt; - dev->eo->send = au1x00_send; - dev->eo->recv = au1x00_recv; + dev->eo = &au1x00_ops; eth_register(dev);