diff mbox

[rdma-core,05/10] verbs: Remove the init_device entry point

Message ID 1505855931-4956-6-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe Sept. 19, 2017, 9:18 p.m. UTC
All providers are converted now.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 libibverbs/driver.h |  2 --
 libibverbs/init.c   | 22 +++++++---------------
 2 files changed, 7 insertions(+), 17 deletions(-)
diff mbox

Patch

diff --git a/libibverbs/driver.h b/libibverbs/driver.h
index 397441f49a0e5a..168728cfa1a524 100644
--- a/libibverbs/driver.h
+++ b/libibverbs/driver.h
@@ -129,8 +129,6 @@  struct verbs_device_ops {
 			       struct ibv_context *ctx);
 
 	struct verbs_device *(*alloc_device)(struct verbs_sysfs_dev *sysfs_dev);
-	struct verbs_device *(*init_device)(const char *uverbs_sys_path,
-					    int abi_version);
 	void (*uninit_device)(struct verbs_device *device);
 };
 
diff --git a/libibverbs/init.c b/libibverbs/init.c
index 2369a1df6e1fbd..d75d70b195a6f6 100644
--- a/libibverbs/init.c
+++ b/libibverbs/init.c
@@ -367,22 +367,14 @@  static struct verbs_device *try_driver(const struct verbs_device_ops *ops,
 	struct ibv_device *dev;
 	char value[16];
 
-	if (ops->alloc_device) {
-		if (!match_device(ops, sysfs_dev))
-			return NULL;
+	if (!match_device(ops, sysfs_dev))
+		return NULL;
 
-		vdev = ops->alloc_device(sysfs_dev);
-		if (!vdev) {
-			fprintf(stderr, PFX
-				"Fatal: couldn't allocate device for %s\n",
-				sysfs_dev->ibdev_path);
-			return NULL;
-		}
-	} else {
-		vdev =
-		    ops->init_device(sysfs_dev->sysfs_path, sysfs_dev->abi_ver);
-		if (!vdev)
-			return NULL;
+	vdev = ops->alloc_device(sysfs_dev);
+	if (!vdev) {
+		fprintf(stderr, PFX "Fatal: couldn't allocate device for %s\n",
+			sysfs_dev->ibdev_path);
+		return NULL;
 	}
 
 	vdev->ops = ops;