diff options
author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2016-01-19 14:44:06 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-10 20:37:44 -0500 |
commit | 7af6d00654a16ca805f50e05eebb545ef9dbb016 (patch) | |
tree | 3bf96bc83867ee4b8b0d16ec7ba26bb7ce9d84dd | |
parent | 4331629f57c4def899e560a7e3cb87fda577fb4b (diff) | |
download | blackbird-obmc-linux-7af6d00654a16ca805f50e05eebb545ef9dbb016.tar.gz blackbird-obmc-linux-7af6d00654a16ca805f50e05eebb545ef9dbb016.zip |
staging/rdma/hfi1: 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>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/staging/rdma/hfi1/init.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c index d1cb2c854f9e..7def3f33ac87 100644 --- a/drivers/staging/rdma/hfi1/init.c +++ b/drivers/staging/rdma/hfi1/init.c @@ -998,13 +998,16 @@ struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, size_t extra) { unsigned long flags; struct hfi1_devdata *dd; - int ret; + int ret, nports; + + /* extra is * number of ports */ + nports = extra / sizeof(struct hfi1_pportdata); - dd = (struct hfi1_devdata *)ib_alloc_device(sizeof(*dd) + extra); + dd = (struct hfi1_devdata *)rvt_alloc_device(sizeof(*dd) + extra, + nports); if (!dd) return ERR_PTR(-ENOMEM); - /* extra is * number of ports */ - dd->num_pports = extra / sizeof(struct hfi1_pportdata); + dd->num_pports = nports; dd->pport = (struct hfi1_pportdata *)(dd + 1); INIT_LIST_HEAD(&dd->list); |