@@ -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);
};
@@ -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;
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(-)