Skip to content

Commit

Permalink
net/mlx5e: 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-4-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 3edac08 commit a5f8ef0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/mellanox/mlx5/core/en_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5389,7 +5389,7 @@ void mlx5e_destroy_netdev(struct mlx5e_priv *priv)
static int mlx5e_resume(struct auxiliary_device *adev)
{
struct mlx5_adev *edev = container_of(adev, struct mlx5_adev, adev);
struct mlx5e_priv *priv = dev_get_drvdata(&adev->dev);
struct mlx5e_priv *priv = auxiliary_get_drvdata(adev);
struct net_device *netdev = priv->netdev;
struct mlx5_core_dev *mdev = edev->mdev;
int err;
Expand All @@ -5412,7 +5412,7 @@ static int mlx5e_resume(struct auxiliary_device *adev)

static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
{
struct mlx5e_priv *priv = dev_get_drvdata(&adev->dev);
struct mlx5e_priv *priv = auxiliary_get_drvdata(adev);
struct net_device *netdev = priv->netdev;
struct mlx5_core_dev *mdev = priv->mdev;

Expand Down Expand Up @@ -5456,7 +5456,7 @@ static int mlx5e_probe(struct auxiliary_device *adev,
mlx5e_build_nic_netdev(netdev);

priv = netdev_priv(netdev);
dev_set_drvdata(&adev->dev, priv);
auxiliary_set_drvdata(adev, priv);

priv->profile = profile;
priv->ppriv = NULL;
Expand Down Expand Up @@ -5504,7 +5504,7 @@ static int mlx5e_probe(struct auxiliary_device *adev,

static void mlx5e_remove(struct auxiliary_device *adev)
{
struct mlx5e_priv *priv = dev_get_drvdata(&adev->dev);
struct mlx5e_priv *priv = auxiliary_get_drvdata(adev);
pm_message_t state = {};

mlx5e_dcbnl_delete_app(priv);
Expand Down

0 comments on commit a5f8ef0

Please sign in to comment.