From patchwork Wed Nov 21 13:23:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Hlavacek X-Patchwork-Id: 200751 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 E96F22C007E for ; Thu, 22 Nov 2012 00:35:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CBF304A17A; Wed, 21 Nov 2012 14:35:16 +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 zWL3vn0scvtT; Wed, 21 Nov 2012 14:35:16 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 757C04A1C4; Wed, 21 Nov 2012 14:34:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2DD904A0F0 for ; Wed, 21 Nov 2012 14:32:36 +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 Escu7O0qUtCA for ; Wed, 21 Nov 2012 14:32:35 +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 6ED474A342 for ; Wed, 21 Nov 2012 14:32:13 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id a1so2244474eaa.3 for ; Wed, 21 Nov 2012 05:32:13 -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=pPfxMueNa79bjkzAhOGx8RjLiMtfNgbONwGfFO/D6S4=; b=rJgxb3m6S03aHLflIWzIE2zuyTXNZXh1AxCdRKfLRKGCaRqv/BV1ilWt2RG0666zV6 B+qp6p32h7Se/aZHOQ8lO/DdEqOR6XJlsOzqE7tDdUJGC5lGiKKCFKUmBPTgOKFjFRn/ 3XwzMn+mm/36msPWuOCyJCC1Xj41nTqWVybesVfVEfWGe3bQnA4egYqvLG7gQRNSgAxw +ls661m6Qs/4ebb2xpH3Gc2Ha0nDzNhowcTIO+epg8vc+3eaLDzMVqu6wC4T7y3fjHRk EpGICCGF04H85QdTW+PZsD3Fc3bA5ovdfyg07KT+wBE+xrFn0YmX6t75La08qoWkwopU YrWg== Received: by 10.14.211.135 with SMTP id w7mr37766908eeo.4.1353504732956; Wed, 21 Nov 2012 05:32:12 -0800 (PST) Received: from tapir ([89.177.24.237]) by mx.google.com with ESMTPS id v47sm226452eeo.9.2012.11.21.05.32.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 05:32:12 -0800 (PST) Received: by tapir (Postfix, from userid 2001) id 4A8554637B2; 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:29 +0100 Message-Id: <1353504238-11277-39-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 38/67] net: rtl8139: 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/rtl8139.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index ed02cf6..0e4e5d5 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -200,6 +200,16 @@ static struct pci_device_id supported[] = { {} }; +static struct eth_ops rtl8139_ops = { + .init = rtl8139_probe, + .halt = rtl_disable, + .send = rtl_transmit, + .recv = rtl_poll, +#ifdef CONFIG_MCAST_TFTP + .mcast = rtl_bcast_addr +#endif +}; + int rtl8139_initialize(bd_t *bis) { pci_dev_t devno; @@ -229,13 +239,7 @@ int rtl8139_initialize(bd_t *bis) dev->priv = (void *) devno; dev->iobase = (int)bus_to_phys(iobase); - dev->eo->init = rtl8139_probe; - dev->eo->halt = rtl_disable; - dev->eo->send = rtl_transmit; - dev->eo->recv = rtl_poll; -#ifdef CONFIG_MCAST_TFTP - dev->eo->mcast = rtl_bcast_addr; -#endif + dev->eo = &rtl8139_ops; eth_register (dev);