From patchwork Fri Nov 2 17:17:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 196635 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 ECE932C00C4 for ; Sat, 3 Nov 2012 04:20:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A483F4A1E0; Fri, 2 Nov 2012 18:20:23 +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 F2tKBiFQtCRV; Fri, 2 Nov 2012 18:20:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C64444A193; Fri, 2 Nov 2012 18:19:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C99E24A166 for ; Fri, 2 Nov 2012 18:19:10 +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 5AFt+rguJOZG for ; Fri, 2 Nov 2012 18:19:10 +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 2BB034A137 for ; Fri, 2 Nov 2012 18:18:59 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id k13so1625261eaa.3 for ; Fri, 02 Nov 2012 10:18:59 -0700 (PDT) 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=27kMjZUmq0WyS7T05qNhX9I0yzDMTrB9NconqGHA1jk=; b=dEwLAMp+rO5aejOc8Z9LcCvdJTaA5MjEdPs4zu5zMxitLbF0OV+mjUoONlsPTmeZnZ 2dwY1QIaU8yYSSF+dJG+HTqQvKcIY5pKMSbKGv1dxhmKumtEEdXUJFmjVZobQuqmB6Hf 2qxP7O6wtpZdRr7vuc+yYXCRGZo9SbjFBSJtp5gKybbg57yjD41KO2gNj4Hi/P3Za47l rnLR3H+3hw7JK7R19UvRxEWP3X1Mp1+17CENK5oO1vpkOZwArsPP+fbFb+8eDfCUuAft KZLS7HAI2+/tMea8aWG151FuvNl1/RFPTXqgfRc5MvbL/Get9C2Ou2Dv9I65zxCXtFRT fZEQ== Received: by 10.14.200.194 with SMTP id z42mr8859182een.13.1351876738979; Fri, 02 Nov 2012 10:18:58 -0700 (PDT) Received: from tapir ([2001:1488:ac14:1400:224:7eff:fe6e:2518]) by mx.google.com with ESMTPS id b44sm24502367eep.12.2012.11.02.10.18.57 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 Nov 2012 10:18:57 -0700 (PDT) Received: by tapir (Postfix, from userid 2001) id 54036462C7C; Fri, 2 Nov 2012 18:18:54 +0100 (CET) From: Tomas Hlavacek To: u-boot@lists.denx.de Date: Fri, 2 Nov 2012 18:17:59 +0100 Message-Id: <1351876722-5183-8-git-send-email-tmshlvck@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351876722-5183-1-git-send-email-tmshlvck@gmail.com> References: <1351876722-5183-1-git-send-email-tmshlvck@gmail.com> Cc: marex@denx.de Subject: [U-Boot] [RFC PATCH 07/50] net: ax88180: 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/ax88180.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c index 464f261..fc237ba 100644 --- a/drivers/net/ax88180.c +++ b/drivers/net/ax88180.c @@ -698,6 +698,14 @@ static void ax88180_read_mac_addr (struct eth_device *dev) } } +static struct eth_ops ax88180_ops = { + .init = ax88180_init, + .halt = ax88180_halt, + .send = ax88180_send, + .recv = ax88180_recv +}; + + /* =========================================================================== <<<<<< Exported SubProgram Bodies >>>>>> @@ -725,10 +733,7 @@ int ax88180_initialize (bd_t * bis) sprintf (dev->name, "ax88180"); dev->iobase = AX88180_BASE; dev->priv = priv; - dev->eo->init = ax88180_init; - dev->eo->halt = ax88180_halt; - dev->eo->send = ax88180_send; - dev->eo->recv = ax88180_recv; + dev->eo = &ax88180_ops; priv->BusWidth = BUS_WIDTH_32; priv->PadSize = 3;