From patchwork Wed Nov 21 13:23:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200709 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 7ED482C007E for ; Thu, 22 Nov 2012 00:28:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D2F74A098; Wed, 21 Nov 2012 14:28:37 +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 GexsNJRvL7SF; Wed, 21 Nov 2012 14:28:37 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 360B24A11A; Wed, 21 Nov 2012 14:27:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37D864A0F5 for ; Wed, 21 Nov 2012 14:25:05 +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 6AkiLwyqAMsd for ; Wed, 21 Nov 2012 14:25:04 +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 5A3AD4A08E for ; Wed, 21 Nov 2012 14:24:31 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id a1so2241673eaa.3 for ; Wed, 21 Nov 2012 05:24:31 -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=yXbsiU2eEX0XTTUNYoHtkMNVf1rS+I4YeB6q2ayK+ZU=; b=sIru5OEbSIRTsUrGK39JLEf9vxn1GKyaEO3kmTaMUbqVEkVLlSgLTfijI+TbHrPZWH ZZP5KeF0jIM+HoIUCBsIiJV05wl9k+MvIumC3f1VkuYrFdTg48lsVvoldjKYlurbbHy3 dndvmQLeRsyHp7cbzlJlYLdg9kPUm4CIaZIaWyhyzfBOOqSgacI7dsOEpmtVMwx1j2b/ 4MlcSyTutPz11kqv9UB6vFIWRgrrSHi1en/qcB1G2t7bGLcDBRVf+Hxm/sThPC7zun+0 O84YRd6chfpQ1mSQ3foKM0i3UeIy5DWFbrF6DFPj2mToPTXn/ryiOa2UQ2BR3x33Lviv aYsQ== Received: by 10.14.207.68 with SMTP id m44mr45502681eeo.40.1353504271259; Wed, 21 Nov 2012 05:24:31 -0800 (PST) Received: from tapir ([89.177.24.237]) by mx.google.com with ESMTPS id e7sm229159eep.1.2012.11.21.05.24.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:24:29 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id 3B7834637B0; 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:27 +0100 Message-Id: <1353504238-11277-37-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 36/67] net: pcnet: 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/pcnet.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c index 35254c3..8bb8c67 100644 --- a/drivers/net/pcnet.c +++ b/drivers/net/pcnet.c @@ -154,6 +154,12 @@ static struct pci_device_id supported[] = { {} }; +static struct eth_ops pcnet_ops = { + .init = pcnet_init, + .halt = pcnet_halt, + .send = pcnet_send, + .recv = pcnet_recv +}; int pcnet_initialize (bd_t * bis) { @@ -216,12 +222,9 @@ int pcnet_initialize (bd_t * bis) } /* - * Setup device structure and register the driver. + * Setup device ops and register the driver. */ - dev->eo->init = pcnet_init; - dev->eo->halt = pcnet_halt; - dev->eo->send = pcnet_send; - dev->eo->recv = pcnet_recv; + dev->eo = &pcnet_ops; eth_register (dev); }