From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 224F77CFA for ; Thu, 1 Jun 2017 12:12:16 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id n195so25306050wmg.1 for ; Thu, 01 Jun 2017 03:12:16 -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=lvlVl/BdWfN7Kei+0C2t5OE4fv9IrDkL5bUXPAWk+fk=; b=NgigrpI77YuHUSaVTDtYO+dXp0TCMfh5LMRtUt4j8xuLlVlyu8+KdPXeDoQ19MAVhs iEz+8uLNqA/jtQXwtk946lboElVWWYr0qCtMLAeVoNFlRj+rlYRz5WAUnr5i3dNwhRo8 lj4HJhsgLetfovZmWYDKwDOcjCC7K8X1AIfB+8keB7K2MjlRR0KBg6kIqzcBUMH+gp1k dOhF/QTO04LDNeR9/kP6GXV8VwBOI+jfQoz6RcXuZ7zLYzByLij4+VDN5TvSQ3rYvHT+ XdyEL0gawufukONKXOt353iK4Ti6bHQsg5xrtm+0lcD0YDi6Fq7vYwqGuwfRgbcqMaS0 x2ow== 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=lvlVl/BdWfN7Kei+0C2t5OE4fv9IrDkL5bUXPAWk+fk=; b=p/HgrEPasrSdaSxyWP17Ft4OO8jmtsGEqnVWHCju9a01wJ1eAselxktcasewJZ0yDG gC3Yqr4zUCnFGQabKuyZxK//pEOH5Fk20ZTENiVD4ggDHThCy6eCyTmG2s3A1PwLcoVd DsyvvjkEqPxzc3X8By+duE2p+aJwZ1UaT/3SrRo8bWjkygTH80gTUjslTEFRCJJRHYUn VbrAVVWD1zSnGUxfUe15J1RwbZ0nHbVaMBASTxx2mR0vDkjIKRy0/nwdaXLQ5Im8QtTv hjxeQok1Aa8WDcD/R9pgSCjS6nG3Jxxw4IMHIzwGXj5epWDXvO5tVXmoDcYOjuZbNvku AKDQ== X-Gm-Message-State: AODbwcDvU9v0IvZuqJ7jBZon87+okPnqTC2VVY3/XAMcbdxQEsmCd7hs VFVJU62OFxe/86mwqoI= X-Received: by 10.28.193.202 with SMTP id r193mr1158951wmf.31.1496311935509; Thu, 01 Jun 2017 03:12:15 -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 e83sm33697524wmc.28.2017.06.01.03.12.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jun 2017 03:12:14 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 1 Jun 2017 12:12:02 +0200 Message-Id: <7b295f0d8d79cc3e6b25e4166c843535e4315e84.1496310671.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 v2 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: Thu, 01 Jun 2017 10:12:16 -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 082bbae..9ef064f 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); } @@ -374,16 +370,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