From patchwork Fri Nov 2 17:18:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 196647 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 112672C00B0 for ; Sat, 3 Nov 2012 04:23:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E0C3D4A108; Fri, 2 Nov 2012 18:21: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 4A5uUM9teB5V; Fri, 2 Nov 2012 18:21:41 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AB0B64A1A3; Fri, 2 Nov 2012 18:19:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E03F4A0F9 for ; Fri, 2 Nov 2012 18:19:19 +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 2FmLCx2eeDCk for ; Fri, 2 Nov 2012 18:19:18 +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 EE7534A163 for ; Fri, 2 Nov 2012 18:19:02 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id d4so2187556eek.3 for ; Fri, 02 Nov 2012 10:19:02 -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=8aylqXEdrjbO1xzOg03g1uOcGSwob/GXbrLiJurgdJg=; b=hUqtV2nl/afL05htgTJ3RkurHmYramBNATsWR3TkcuBvphHSq/Q9lkd96wzClEw8F7 nQORfapF1mVG6E0DlQRaUM0MXkfkJA+gY5F0BFaqU43gNoi5XEU6EeJIqJ+X6i1neNMe HB+GPgxk673bD8d66BtXn5K3yBoRMN6iQE0TM5zzBej9glgSN5Uf+iDK4TTSt3Dff0r6 cec9JnLT8h2/R/ycn6mWald9V+JeSvlov3hED9K3Jc8GkZ6dLRu8ur0VhoHP9gEEj9Tx UKuKJ42TNscOvHME0+BUKqhnOQ8Kf2fLXPgtI7fWCnOfV//A71/m3z2PP6MIXEHAJwNS eZ1Q== Received: by 10.14.213.65 with SMTP id z41mr8670964eeo.29.1351876742775; Fri, 02 Nov 2012 10:19:02 -0700 (PDT) Received: from tapir ([217.31.207.1]) by mx.google.com with ESMTPS id k2sm24500640eep.15.2012.11.02.10.19.00 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 Nov 2012 10:19:02 -0700 (PDT) Received: by tapir (Postfix, from userid 2001) id A41D8463238; Fri, 2 Nov 2012 18:18:54 +0100 (CET) From: Tomas Hlavacek To: u-boot@lists.denx.de Date: Fri, 2 Nov 2012 18:18:09 +0100 Message-Id: <1351876722-5183-18-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 17/50] net: eepro100: 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/eepro100.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index e3aa720..91d7f0b 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -408,6 +408,13 @@ static struct pci_device_id supported[] = { {} }; +static struct eth_ops eepro100_ops = { + .init = eepro100_init, + .halt = eepro100_halt, + .send = eepro100_send, + .recv = eepro100_recv +}; + int eepro100_initialize (bd_t * bis) { pci_dev_t devno; @@ -458,10 +465,7 @@ int eepro100_initialize (bd_t * bis) sprintf (dev->name, "i82559#%d", card_number); dev->priv = (void *) devno; /* this have to come before bus_to_phys() */ dev->iobase = bus_to_phys (iobase); - dev->eo->init = eepro100_init; - dev->eo->halt = eepro100_halt; - dev->eo->send = eepro100_send; - dev->eo->recv = eepro100_recv; + dev->eo = &eepro100_ops; eth_register (dev);