diff options
| author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2016-01-22 13:07:23 -0800 | 
|---|---|---|
| committer | Doug Ledford <dledford@redhat.com> | 2016-03-10 20:37:28 -0500 | 
| commit | 5df1673f1de2b6dad614c929ef47ccebba3bd970 (patch) | |
| tree | 653bbe08880cf434c2e578c8c89e34f9ee055ec5 /drivers/infiniband/hw/qib/qib_init.c | |
| parent | 74d2d50067c09c2e9686ef742c1ae08f9c8c3ddf (diff) | |
IB/qib: Use rdmavt device allocation function
No longer do drivers need to call into the IB core to allocate the verbs
device.  Use the functionality provided by rdmavt.
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_init.c')
| -rw-r--r-- | drivers/infiniband/hw/qib/qib_init.c | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index 5087a1f808c0..a3c74bb4df62 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -1131,9 +1131,12 @@ struct qib_devdata *qib_alloc_devdata(struct pci_dev *pdev, size_t extra)  {  	unsigned long flags;  	struct qib_devdata *dd; -	int ret; +	int ret, nports; -	dd = (struct qib_devdata *) ib_alloc_device(sizeof(*dd) + extra); +	/* extra is * number of ports */ +	nports = extra / sizeof(struct qib_pportdata); +	dd = (struct qib_devdata *)rvt_alloc_device(sizeof(*dd) + extra, +						    nports);  	if (!dd)  		return ERR_PTR(-ENOMEM);  | 
