From patchwork Wed Nov 21 13:23:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200703 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 850F02C0089 for ; Thu, 22 Nov 2012 00:27:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DD9854A16A; Wed, 21 Nov 2012 14:27:39 +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 lfIjsQuqNaiQ; Wed, 21 Nov 2012 14:27:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B4FBF4A100; Wed, 21 Nov 2012 14:25:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DDD024A0C1 for ; Wed, 21 Nov 2012 14:24:51 +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 4Cs+AW7Blisa for ; Wed, 21 Nov 2012 14:24:46 +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 C2FF34A04A for ; Wed, 21 Nov 2012 14:24:26 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id a1so2241656eaa.3 for ; Wed, 21 Nov 2012 05:24:26 -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=KzmRrcC6zF1KyOmt5N1fkCoYYXXmBYBwNCJNpG8FJkM=; b=08Vaa3KeYko14r7cP09jRajqofoEOzBDZHEnSZOQNa+bowYu8tC8nY6pwuLCIOfQzO oa5EHf1SD43vZLGph+XKQ+TaUqwwyaiCN2J+K1j63pAgERyqtGrksgeZgbuY0mi3lEZ/ 7LOs4TJ6XWIDFOgSp9bIu3cYW7lfJq5TTEmplEIh1STHaISf6FSjWrBYFgXJ3Iytd2LK Qpo3IiTw9984OMqnxicz067adsmgTI6P0TbwR+1vZrxsZSS+nIBT7MMMg9UVk8CqQOFi VpP75y5KCtvrxnbecVSZBrfq6mb9x9v3PjPWciLOaSqLWqzDjt9w1M5ezNmFtQwkA0DU oxmQ== Received: by 10.14.178.195 with SMTP id f43mr45764633eem.44.1353504266678; Wed, 21 Nov 2012 05:24:26 -0800 (PST) Received: from tapir ([2001:1ab0:b101::1003]) by mx.google.com with ESMTPS id g47sm203151eeo.6.2012.11.21.05.24.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:24:25 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id 8646146364B; 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:03 +0100 Message-Id: <1353504238-11277-13-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 12/67] net: dc2114x: 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/dc2114x.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index 0361699..afdc088 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net/dc2114x.c @@ -207,6 +207,13 @@ static struct pci_device_id supported[] = { { } }; +static struct eth_ops dc21x4x_ops = { + .init = dc21x4x_init, + .halt = dc21x4x_halt, + .send = dc21x4x_send, + .recv = dc21x4x_recv +}; + int dc21x4x_initialize(bd_t *bis) { int idx=0; @@ -299,11 +306,8 @@ int dc21x4x_initialize(bd_t *bis) #else dev->iobase = pci_mem_to_phys(devbusfn, iobase); #endif - dev->priv = (void*) devbusfn; - dev->eo->init = dc21x4x_init; - dev->eo->halt = dc21x4x_halt; - dev->eo->send = dc21x4x_send; - dev->eo->recv = dc21x4x_recv; + dev->priv = (void *) devbusfn; + dev->eo = &dc21x4x_ops; /* Ensure we're not sleeping. */ pci_write_config_byte(devbusfn, PCI_CFDA_PSM, WAKEUP);