IB/core: Use dev.parent instead of dma_device
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 20 Jan 2017 21:04:14 +0000 (13:04 -0800)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 17:23:35 +0000 (12:23 -0500)
Prepare for removal of ib_device.dma_device.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/ucm.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/uverbs_main.c

index e0a995b85a2d982c1e2c42deb1fd481563b3ce7e..cc0d51fb06e39e9d14a12e064b34a2ebf7f13b5d 100644 (file)
@@ -1290,7 +1290,7 @@ static void ib_ucm_add_one(struct ib_device *device)
                goto err;
 
        ucm_dev->dev.class = &cm_class;
-       ucm_dev->dev.parent = device->dma_device;
+       ucm_dev->dev.parent = device->dev.parent;
        ucm_dev->dev.devt = ucm_dev->cdev.dev;
        ucm_dev->dev.release = ib_ucm_release_dev;
        dev_set_name(&ucm_dev->dev, "ucm%d", ucm_dev->devnum);
index 249b403b43a440ba885b374988094e3fbe9e5498..aca7ff7abedc33a4e0928b6c2bb2c0904e71bff5 100644 (file)
@@ -1188,7 +1188,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
        if (cdev_add(&port->cdev, base, 1))
                goto err_cdev;
 
-       port->dev = device_create(umad_class, device->dma_device,
+       port->dev = device_create(umad_class, device->dev.parent,
                                  port->cdev.dev, port,
                                  "umad%d", port->dev_num);
        if (IS_ERR(port->dev))
@@ -1207,7 +1207,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
        if (cdev_add(&port->sm_cdev, base, 1))
                goto err_sm_cdev;
 
-       port->sm_dev = device_create(umad_class, device->dma_device,
+       port->sm_dev = device_create(umad_class, device->dev.parent,
                                     port->sm_cdev.dev, port,
                                     "issm%d", port->dev_num);
        if (IS_ERR(port->sm_dev))
index b3f95d453fba73073c42bcbdebe96cce98eabd72..e3fb4b1af1ad35d292c90a90192cfe6badfcfe62 100644 (file)
@@ -1174,7 +1174,7 @@ static void ib_uverbs_add_one(struct ib_device *device)
        if (cdev_add(&uverbs_dev->cdev, base, 1))
                goto err_cdev;
 
-       uverbs_dev->dev = device_create(uverbs_class, device->dma_device,
+       uverbs_dev->dev = device_create(uverbs_class, device->dev.parent,
                                        uverbs_dev->cdev.dev, uverbs_dev,
                                        "uverbs%d", uverbs_dev->devnum);
        if (IS_ERR(uverbs_dev->dev))