From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id B92467D04 for ; Wed, 24 May 2017 17:18:45 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id b84so68115448wmh.0 for ; Wed, 24 May 2017 08:18: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=b8ealMD64JDCYIvD09PufC4l0UbV0z43Kvzo3bul6nM=; b=JMeJwz6Nxg0eBEVTVWcxvP2sQm9s3jsx1acCV/udPpdT4F7FJ/XeEeVhJ8QJJ2CBSQ yq8osnEp+qa7iGdfNHt+K77Sy9QFu0JOdZ1FLr4iaL98HNvciATMoNzzWTMM8BZrGUjF bbNcKlB5vSmEb7wMBoeyZ5ljxcn1bnob7LA8kRkILnIGuyIAKjd4pTfOL51C8EqK+SCn B06Hv/GdBwoKDF2Vs/jkKZKmDC6tZPrYApsMqqra+A8EZeEg2boLxF1DvPNZV4T19ol3 41JMPE3MF+9zMXbELvEwKZ+JDXDS977J9OxfMoCS3rtMRhvF0s/EbDsU+QL/QaZhGizD SBSQ== 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=b8ealMD64JDCYIvD09PufC4l0UbV0z43Kvzo3bul6nM=; b=UN6GXeIbudI1uxL4fpj8rl+D4FqlYtPo2dNoHwbWWlh8MHa0KwRLGpIkjdHjqazJwL 07ibcC0HQZdEG34nAjdzzP+11cM5lYom5PR6zwUlkr9RpzNxsGJ3qwQsOPwhskr3vOLl 4Ot4A+kwrX6vOs/JjX4D6CMTD5RMvkvJMANN2z/qcNIe99xC2cQVur3+a7uTwIP7ZDEX VBaSByOrKyC8pNT2OFS7Ni5Giv3+kn0uctYEyHoW0YmnX+aijqRwoMZ/rojkIDANZliM 4d+au7bdnxHRbDJUaey3TjnDLtrwtwf5oB1nXHutPWJsfLqAIf9UJrhUr8tUD4OUx1ji m2ig== X-Gm-Message-State: AODbwcBmT3iKJZ7U5xieEWmJKdbVWvFTFjQMTQwQxcR1OKTEBeFw0qEv Esp7l+7/wUFiBaJm5js= X-Received: by 10.28.18.72 with SMTP id 69mr6343465wms.37.1495639124688; Wed, 24 May 2017 08:18:44 -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 p107sm5880800wrb.64.2017.05.24.08.18.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 08:18:43 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , Jan Blunck , Stephen Hemminger , Maxime Coquelin , Jerin Jacob , David Marchand Date: Wed, 24 May 2017 17:18:31 +0200 Message-Id: <710a4a36c4361a4b9ced324a1ac421664862e1ff.1495629219.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 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, 24 May 2017 15:18: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 4e83326..55d53c2 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -52,14 +52,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); } @@ -380,16 +376,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