From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id B93E758CE for ; Mon, 26 Jun 2017 02:22:35 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id c11so131615659wrc.3 for ; Sun, 25 Jun 2017 17:22:35 -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=C04tiCbjSHcJdIjFemuvqE0XBgBg3Ec6AQkAeGZW1Jc=; b=Syu4nCoBJn2MJh1E015p2MCiHJhfB20b28LeqBgs6AnyyJop+9zmalXk17H1S1TSxp b4R0C6yImGtYu6uCuJ0a2amt6MigeDwTpPbJ0oOgz2eDy/NNrXBBqLWBXBp95rZ3aFtA Aro9w+wkpdAyII+kPLZJdRj8tNkMw0uvP3jD5++qMCWnB8IzbMRT30jJleTq/ZhTB5AB ICQe1zxcykIHPAIqoUOBT8+gyX83JqWTojyvJBlNHJ0Penq4UzCKzU1fhBSlabU6s+fq 82eojUKkiWKOqCnLL31aGY4hLOTrT0GcV8G1kcwdRv78MdI5FqU5VTVzmudrk2h+SdOG gxWw== 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=C04tiCbjSHcJdIjFemuvqE0XBgBg3Ec6AQkAeGZW1Jc=; b=sjqcFfNuhdYt5CZNugFCuZrn7PBKwBpnhisCuZyGoAEGz3D7vlChJJAKFoemvDyu9/ HS+zr3f7C+8HJdXIMZXYLBx9hA66r1ou5XEQyKPKWUJErWJpDe3AQrDhk4V5EeJPE3VE +P93uAZ19Th2znhStxF5TDlZMd4bBMRqDd2fsaNhL8fPOze7YmuCnybUuZQjsxf7Q0Qo LPCGkdNeaLRaxPStvGgWuCoal2zsOS1vOsEzo8e5QNMeH6ofpHINkC5Gew4tjYTn9uVW 87BTBqdW94jVQG9qBVNoiqvKIHE1fjVrR6SQdyWWAVeKszIZEvBT0jFX1PXkMNqRSOPd EitA== X-Gm-Message-State: AKS2vOx5pVkItz7NghXvmQbixbBbMtJD9PR6Znd1x6qvtpzJDQEnpaDp Hvl0JWAiICrKCWkGESo= X-Received: by 10.223.164.23 with SMTP id d23mr12749142wra.58.1498436554958; Sun, 25 Jun 2017 17:22:34 -0700 (PDT) Received: from bidouze.dev.6wind.com ([62.23.145.78]) by smtp.gmail.com with ESMTPSA id 19sm16061626wrx.26.2017.06.25.17.22.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Jun 2017 17:22:34 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Mon, 26 Jun 2017 02:22:07 +0200 Message-Id: <90cc9f43072a992e754324f46e7924f31090b9f0.1498436062.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 v5 09/12] 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: Mon, 26 Jun 2017 00:22:36 -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 22e4640..a654709 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); } @@ -392,16 +388,4 @@ static struct rte_bus rte_vdev_bus = { .unplug = vdev_unplug, }; -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 = RTE_STR(virtual); - rte_bus_register(&rte_vdev_bus); -} +RTE_REGISTER_BUS(VIRTUAL_BUS_NAME, rte_vdev_bus); -- 2.1.4