Skip to content

Commit 27963d3

Browse files
debox1gregkh
authored andcommitted
RDMA/irdma: Use auxiliary_device driver data helpers
Use auxiliary_get_drvdata and auxiliary_set_drvdata helpers. Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: David E. Box <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20211221235852.323752-2-david.e.box@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a3c8f90 commit 27963d3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/infiniband/hw/irdma/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static void irdma_remove(struct auxiliary_device *aux_dev)
207207
struct iidc_auxiliary_dev,
208208
adev);
209209
struct ice_pf *pf = iidc_adev->pf;
210-
struct irdma_device *iwdev = dev_get_drvdata(&aux_dev->dev);
210+
struct irdma_device *iwdev = auxiliary_get_drvdata(aux_dev);
211211

212212
irdma_ib_unregister_device(iwdev);
213213
ice_rdma_update_vsi_filter(pf, iwdev->vsi_num, false);
@@ -294,7 +294,7 @@ static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_
294294
ice_rdma_update_vsi_filter(pf, iwdev->vsi_num, true);
295295

296296
ibdev_dbg(&iwdev->ibdev, "INIT: Gen2 PF[%d] device probe success\n", PCI_FUNC(rf->pcidev->devfn));
297-
dev_set_drvdata(&aux_dev->dev, iwdev);
297+
auxiliary_set_drvdata(aux_dev, iwdev);
298298

299299
return 0;
300300

drivers/infiniband/hw/mlx5/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4422,15 +4422,15 @@ static int mlx5r_mp_probe(struct auxiliary_device *adev,
44224422
}
44234423
mutex_unlock(&mlx5_ib_multiport_mutex);
44244424

4425-
dev_set_drvdata(&adev->dev, mpi);
4425+
auxiliary_set_drvdata(adev, mpi);
44264426
return 0;
44274427
}
44284428

44294429
static void mlx5r_mp_remove(struct auxiliary_device *adev)
44304430
{
44314431
struct mlx5_ib_multiport_info *mpi;
44324432

4433-
mpi = dev_get_drvdata(&adev->dev);
4433+
mpi = auxiliary_get_drvdata(adev);
44344434
mutex_lock(&mlx5_ib_multiport_mutex);
44354435
if (mpi->ibdev)
44364436
mlx5_ib_unbind_slave_port(mpi->ibdev, mpi);
@@ -4480,15 +4480,15 @@ static int mlx5r_probe(struct auxiliary_device *adev,
44804480
return ret;
44814481
}
44824482

4483-
dev_set_drvdata(&adev->dev, dev);
4483+
auxiliary_set_drvdata(adev, dev);
44844484
return 0;
44854485
}
44864486

44874487
static void mlx5r_remove(struct auxiliary_device *adev)
44884488
{
44894489
struct mlx5_ib_dev *dev;
44904490

4491-
dev = dev_get_drvdata(&adev->dev);
4491+
dev = auxiliary_get_drvdata(adev);
44924492
__mlx5_ib_remove(dev, dev->profile, MLX5_IB_STAGE_MAX);
44934493
}
44944494

0 commit comments

Comments
 (0)