Skip to content
Commit e349f858 authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

RDMA: Fully setup the device name in ib_register_device



The current code has two copies of the device name, ibdev->dev and
dev_name(&ibdev->dev), and they are setup at different times, which is
very confusing.

Set them both up at the same time and make dev_name() the lead name, which
is the proper use of the driver core APIs. To make it very clear that the
name is not valid until registration pass it in to the
ib_register_device() call rather than messing with ibdev->name directly.

Also the reorganization now checks that dev_name is unique even if it does
not contain a %.

Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Acked-by: default avatarAdit Ranadive <aditr@vmware.com>
Reviewed-by: default avatarSteve Wise <swise@opengridcomputing.com>
Acked-by: default avatarDevesh Sharma <devesh.sharma@broadcom.com>
Reviewed-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
parent 46bdf777
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment