]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/infiniband/sw/rxe/rxe_verbs.c
RDMA: Introduce and use rdma_device_to_ibdev()
[linux.git] / drivers / infiniband / sw / rxe / rxe_verbs.c
index 43171148e9c50e352fd2a61c84d9a9def6179d8d..3d01247a28db3f106a9c38928d23626932727062 100644 (file)
@@ -1129,8 +1129,8 @@ static int rxe_detach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid)
 static ssize_t parent_show(struct device *device,
                           struct device_attribute *attr, char *buf)
 {
-       struct rxe_dev *rxe = container_of(device, struct rxe_dev,
-                                          ib_dev.dev);
+       struct rxe_dev *rxe =
+               rdma_device_to_drv_device(device, struct rxe_dev, ib_dev);
 
        return snprintf(buf, 16, "%s\n", rxe_parent_name(rxe, 1));
 }