提交 45e3a279 编写于 作者: D David E. Box 提交者: Greg Kroah-Hartman

vdpa/mlx5: Use auxiliary_device driver data helpers

Use auxiliary_get_drvdata and auxiliary_set_drvdata helpers.
Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: NDavid E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20211221235852.323752-5-david.e.box@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a5f8ef0b
...@@ -2683,7 +2683,7 @@ static int mlx5v_probe(struct auxiliary_device *adev, ...@@ -2683,7 +2683,7 @@ static int mlx5v_probe(struct auxiliary_device *adev,
if (err) if (err)
goto reg_err; goto reg_err;
dev_set_drvdata(&adev->dev, mgtdev); auxiliary_set_drvdata(adev, mgtdev);
return 0; return 0;
...@@ -2696,7 +2696,7 @@ static void mlx5v_remove(struct auxiliary_device *adev) ...@@ -2696,7 +2696,7 @@ static void mlx5v_remove(struct auxiliary_device *adev)
{ {
struct mlx5_vdpa_mgmtdev *mgtdev; struct mlx5_vdpa_mgmtdev *mgtdev;
mgtdev = dev_get_drvdata(&adev->dev); mgtdev = auxiliary_get_drvdata(adev);
vdpa_mgmtdev_unregister(&mgtdev->mgtdev); vdpa_mgmtdev_unregister(&mgtdev->mgtdev);
kfree(mgtdev); kfree(mgtdev);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册