From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 9898423B for ; Thu, 8 Jun 2017 01:58:45 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id d73so20767178wma.0 for ; Wed, 07 Jun 2017 16:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=gkgrrcZb9oETfDC3OG2WvKt7gFrsapkPD3KJA3ium58=; b=U+wLUW7ieKAbBlDJvTZyioeBaw3tBtGK864FMOtF8CMjYqLlgfMSZZEMuPUQiXW4mH 1QyHFy5JIOCFJyng3qVqBGBhQ8v1oFhpLLYKKQV4mIFzeIcGXaUKslV96FHq5X6nMnX5 m4lgSIxgTLMeMB5eEhHG5dsqo/ySgVgFbzb7wNUZQMlaPTq0OeljUWTBjCS7XqlsO3S5 EUpT6aNk6KkBzjopIdKrziWcSlO0NY5u6DcyBucdxoA5Lbka10lsTyPisleBovPd7ekz GgvW0VcQgrFfNcavWw2mS4R/XF9fWiIeY0yh6PFTvU9n1hAsijKsbcIZoOVlGzTgkSSG ydtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=gkgrrcZb9oETfDC3OG2WvKt7gFrsapkPD3KJA3ium58=; b=tMsET1P2R9OKC05r2/IzUjTzF9ljpUtcueSH5tJhPVVyOyHHuWDtJ7Xa2l/syVax0c ZoaOzKwvyk5ECEbeRuPaO8qZFVQfrgyoOjfUKnEFlm8DotZg0bAPMBrh9JDaJxkwc/e/ BNvMtUykxUCtgZzCoefc+ObXKl7Or3YxJQjCnyH8Q2Y9W26BlLjbY8yqV4jczEu4+L/P 96vj1lY//8pawVveRPOPTkWl8SUNIkp/FvdfPRMBjkWZePjqKeql2X/5YrMPtfvfUx2i 2Xg6YUa6ku16bn5lUq2GKYk1uKa0xLzLSHLwsQXu7rXg5p4W3Mge8kpws/to/PNY+Jfd o0sA== X-Gm-Message-State: AKS2vOwQNiTe05R9yFb5/LOV2ubSuw4tDe3+Ap9xOL0DDJ4bJZTNuyg3 Chq1A3q1YVtaDLPfsGo= X-Received: by 10.28.69.143 with SMTP id l15mr1449216wmi.116.1496879925148; Wed, 07 Jun 2017 16:58:45 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id p65sm5098653wrb.64.2017.06.07.16.58.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jun 2017 16:58:44 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 8 Jun 2017 01:58:30 +0200 Message-Id: <644a3ea058797563976718beeae8f4e7eda5be3c.1496876926.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 3/3] vdev: use standard bus registration function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 23:58:46 -0000 Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_vdev.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index d921345..d007e7e 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -54,14 +54,10 @@ static struct vdev_device_list vdev_device_list = struct vdev_driver_list vdev_driver_list = TAILQ_HEAD_INITIALIZER(vdev_driver_list); -static void rte_vdev_bus_register(void); - /* register a driver */ void rte_vdev_register(struct rte_vdev_driver *driver) { - rte_vdev_bus_register(); - TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next); } @@ -394,16 +390,4 @@ static struct rte_bus rte_vdev_bus = { .parse = vdev_parse, }; -RTE_INIT(rte_vdev_bus_register); - -static void rte_vdev_bus_register(void) -{ - static int registered; - - if (registered) - return; - - registered = 1; - rte_vdev_bus.name = VIRTUAL_BUS_NAME; - rte_bus_register(&rte_vdev_bus); -} +RTE_REGISTER_BUS(VIRTUAL_BUS_NAME, rte_vdev_bus); -- 2.1.4