diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-07-23 13:49:28 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-07-25 19:02:00 +0200 |
commit | 4f96061b92da395ecd5325a87368670e1b1a7cc9 (patch) | |
tree | f922fc890175f54b4427e61e8bb987205fb1fb16 /drivers/infiniband | |
parent | RDMA: Make most headers compile stand alone (diff) | |
download | linux-4f96061b92da395ecd5325a87368670e1b1a7cc9.tar.xz linux-4f96061b92da395ecd5325a87368670e1b1a7cc9.zip |
IB/usnic: Use dev_get_drvdata
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make
the code simpler.
Link: https://lore.kernel.org/r/20190723114928.18424-1-hslester96@gmail.com
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c index eeb07b245ef9..a354c7c86547 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c @@ -194,7 +194,7 @@ find_free_vf_and_create_qp_grp(struct usnic_ib_dev *us_ibdev, return ERR_CAST(dev_list); for (i = 0; dev_list[i]; i++) { dev = dev_list[i]; - vf = pci_get_drvdata(to_pci_dev(dev)); + vf = dev_get_drvdata(dev); spin_lock(&vf->lock); vnic = vf->vnic; if (!usnic_vnic_check_room(vnic, res_spec)) { |