vdpa/mlx5: 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-5-david.e.box@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
a5f8ef0baf
Коммит
45e3a27984
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче