Skip to content

Commit

Permalink
vdpa/mlx5: Use auxiliary_device driver data helpers
Browse files Browse the repository at this point in the history
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-5-david.e.box@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
David E. Box authored and Greg Kroah-Hartman committed Dec 22, 2021
1 parent a5f8ef0 commit 45e3a27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/vdpa/mlx5/net/mlx5_vnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2683,7 +2683,7 @@ static int mlx5v_probe(struct auxiliary_device *adev,
if (err)
goto reg_err;

dev_set_drvdata(&adev->dev, mgtdev);
auxiliary_set_drvdata(adev, mgtdev);

return 0;

Expand All @@ -2696,7 +2696,7 @@ static void mlx5v_remove(struct auxiliary_device *adev)
{
struct mlx5_vdpa_mgmtdev *mgtdev;

mgtdev = dev_get_drvdata(&adev->dev);
mgtdev = auxiliary_get_drvdata(adev);
vdpa_mgmtdev_unregister(&mgtdev->mgtdev);
kfree(mgtdev);
}
Expand Down

0 comments on commit 45e3a27

Please sign in to comment.