diff options
author | Parav Pandit <parav@mellanox.com> | 2018-12-18 13:15:56 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-14 21:12:03 +0100 |
commit | 54747231150f0dddf68f2ee29ec2970fcc433909 (patch) | |
tree | 018c558d4cabe418190cca967f598a24a394e284 /drivers/infiniband/hw/nes | |
parent | RDMA: Rename port_callback to init_port (diff) | |
download | linux-54747231150f0dddf68f2ee29ec2970fcc433909.tar.xz linux-54747231150f0dddf68f2ee29ec2970fcc433909.zip |
RDMA: Introduce and use rdma_device_to_ibdev()
Introduce and use rdma_device_to_ibdev() API for those drivers which are
registering one sysfs group and also use in ib_core.
In subsequent patch, device->provider_ibdev one-to-one mapping is no
longer holds true during accessing sysfs entries.
Therefore, introduce an API rdma_device_to_ibdev() that provides such
information.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 34601f0cbd74..034156f7e9ed 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -2560,7 +2560,7 @@ static ssize_t hw_rev_show(struct device *dev, struct device_attribute *attr, char *buf) { struct nes_ib_device *nesibdev = - container_of(dev, struct nes_ib_device, ibdev.dev); + rdma_device_to_drv_device(dev, struct nes_ib_device, ibdev); struct nes_vnic *nesvnic = nesibdev->nesvnic; nes_debug(NES_DBG_INIT, "\n"); |