diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-01-20 16:04:14 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-01-24 12:23:35 -0500 |
commit | 1e35a0880fb80834a973b51a84c9657208ec0fad (patch) | |
tree | b8be4b051b73d2b4b0958b78c06605d2d5eaa3f4 | |
parent | 97a9ea848016fef86e4a42dc6a65f4384eed32cd (diff) |
IB/core: Use dev.parent instead of dma_device
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>
-rw-r--r-- | drivers/infiniband/core/ucm.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/core/user_mad.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index e0a995b85a2d..cc0d51fb06e3 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c | |||
@@ -1290,7 +1290,7 @@ static void ib_ucm_add_one(struct ib_device *device) | |||
1290 | goto err; | 1290 | goto err; |
1291 | 1291 | ||
1292 | ucm_dev->dev.class = &cm_class; | 1292 | ucm_dev->dev.class = &cm_class; |
1293 | ucm_dev->dev.parent = device->dma_device; | 1293 | ucm_dev->dev.parent = device->dev.parent; |
1294 | ucm_dev->dev.devt = ucm_dev->cdev.dev; | 1294 | ucm_dev->dev.devt = ucm_dev->cdev.dev; |
1295 | ucm_dev->dev.release = ib_ucm_release_dev; | 1295 | ucm_dev->dev.release = ib_ucm_release_dev; |
1296 | dev_set_name(&ucm_dev->dev, "ucm%d", ucm_dev->devnum); | 1296 | dev_set_name(&ucm_dev->dev, "ucm%d", ucm_dev->devnum); |
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 249b403b43a4..aca7ff7abedc 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c | |||
@@ -1188,7 +1188,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, | |||
1188 | if (cdev_add(&port->cdev, base, 1)) | 1188 | if (cdev_add(&port->cdev, base, 1)) |
1189 | goto err_cdev; | 1189 | goto err_cdev; |
1190 | 1190 | ||
1191 | port->dev = device_create(umad_class, device->dma_device, | 1191 | port->dev = device_create(umad_class, device->dev.parent, |
1192 | port->cdev.dev, port, | 1192 | port->cdev.dev, port, |
1193 | "umad%d", port->dev_num); | 1193 | "umad%d", port->dev_num); |
1194 | if (IS_ERR(port->dev)) | 1194 | if (IS_ERR(port->dev)) |
@@ -1207,7 +1207,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, | |||
1207 | if (cdev_add(&port->sm_cdev, base, 1)) | 1207 | if (cdev_add(&port->sm_cdev, base, 1)) |
1208 | goto err_sm_cdev; | 1208 | goto err_sm_cdev; |
1209 | 1209 | ||
1210 | port->sm_dev = device_create(umad_class, device->dma_device, | 1210 | port->sm_dev = device_create(umad_class, device->dev.parent, |
1211 | port->sm_cdev.dev, port, | 1211 | port->sm_cdev.dev, port, |
1212 | "issm%d", port->dev_num); | 1212 | "issm%d", port->dev_num); |
1213 | if (IS_ERR(port->sm_dev)) | 1213 | if (IS_ERR(port->sm_dev)) |
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index b3f95d453fba..e3fb4b1af1ad 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -1174,7 +1174,7 @@ static void ib_uverbs_add_one(struct ib_device *device) | |||
1174 | if (cdev_add(&uverbs_dev->cdev, base, 1)) | 1174 | if (cdev_add(&uverbs_dev->cdev, base, 1)) |
1175 | goto err_cdev; | 1175 | goto err_cdev; |
1176 | 1176 | ||
1177 | uverbs_dev->dev = device_create(uverbs_class, device->dma_device, | 1177 | uverbs_dev->dev = device_create(uverbs_class, device->dev.parent, |
1178 | uverbs_dev->cdev.dev, uverbs_dev, | 1178 | uverbs_dev->cdev.dev, uverbs_dev, |
1179 | "uverbs%d", uverbs_dev->devnum); | 1179 | "uverbs%d", uverbs_dev->devnum); |
1180 | if (IS_ERR(uverbs_dev->dev)) | 1180 | if (IS_ERR(uverbs_dev->dev)) |