From patchwork Wed Nov 21 13:23:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200704 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 EED2D2C009B for ; Thu, 22 Nov 2012 00:27:57 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 756494A03A; Wed, 21 Nov 2012 14:27: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 OZWk4VSWDOJ2; Wed, 21 Nov 2012 14:27:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 502234A103; Wed, 21 Nov 2012 14:25:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5E2D44A04A for ; Wed, 21 Nov 2012 14:24:52 +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 zgda1c8aW4Qv for ; Wed, 21 Nov 2012 14:24:51 +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 D694D4A052 for ; Wed, 21 Nov 2012 14:24:27 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id b47so4433803eek.3 for ; Wed, 21 Nov 2012 05:24:27 -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=xUnJCQEa9bC3hzHP5tnxlc44eObiESP0Dx6eg0Ik8/s=; b=YxRT2AABEiYnzsKDuv7yuxY9W312ofmgClQMbwmiGof6A5JtXISG++4pji8oNXPGhy cRrPtaE7AEx7q5YHO/H2UgOlOBLZHUNDyXvPdJJlZoPxD66nDkhyAjTn5Hn6h/p4z8mF 5ThkPHaeEQX9Gdoxfsqa97EJFLq4e1pKF+trhA+TjQO0NjBPDeNovKFw94n29KJZcc+z XhkdU9yMaluzwFFmT5d3CJ6Dxxg+/4hg6vFXXqfBEOFbqyCO13OW/QQIhTdhV27byBWj BBy1rVYAdkqjU5W+AyVCEcK09pPjutn2nymUl0GXlkm+93f9OCNujNzWb287alERHFab v0nA== Received: by 10.14.203.69 with SMTP id e45mr45400588eeo.38.1353504267763; Wed, 21 Nov 2012 05:24:27 -0800 (PST) Received: from tapir ([89.177.24.237]) by mx.google.com with ESMTPS id o47sm179394eem.11.2012.11.21.05.24.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:24:27 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id A27064636B4; Wed, 21 Nov 2012 14:24:20 +0100 (CET) From: Tomas Hlavacek To: u-boot@lists.denx.de Date: Wed, 21 Nov 2012 14:23:07 +0100 Message-Id: <1353504238-11277-17-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 16/67] 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 files 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);