Skip to content

Commit a5f8ef0

Browse files
debox1gregkh
authored andcommitted
net/mlx5e: 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-4-david.e.box@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3edac08 commit a5f8ef0

File tree

1 file changed

+4
-4
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+4
-4
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5389,7 +5389,7 @@ void mlx5e_destroy_netdev(struct mlx5e_priv *priv)
53895389
static int mlx5e_resume(struct auxiliary_device *adev)
53905390
{
53915391
struct mlx5_adev *edev = container_of(adev, struct mlx5_adev, adev);
5392-
struct mlx5e_priv *priv = dev_get_drvdata(&adev->dev);
5392+
struct mlx5e_priv *priv = auxiliary_get_drvdata(adev);
53935393
struct net_device *netdev = priv->netdev;
53945394
struct mlx5_core_dev *mdev = edev->mdev;
53955395
int err;
@@ -5412,7 +5412,7 @@ static int mlx5e_resume(struct auxiliary_device *adev)
54125412

54135413
static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
54145414
{
5415-
struct mlx5e_priv *priv = dev_get_drvdata(&adev->dev);
5415+
struct mlx5e_priv *priv = auxiliary_get_drvdata(adev);
54165416
struct net_device *netdev = priv->netdev;
54175417
struct mlx5_core_dev *mdev = priv->mdev;
54185418

@@ -5456,7 +5456,7 @@ static int mlx5e_probe(struct auxiliary_device *adev,
54565456
mlx5e_build_nic_netdev(netdev);
54575457

54585458
priv = netdev_priv(netdev);
5459-
dev_set_drvdata(&adev->dev, priv);
5459+
auxiliary_set_drvdata(adev, priv);
54605460

54615461
priv->profile = profile;
54625462
priv->ppriv = NULL;
@@ -5504,7 +5504,7 @@ static int mlx5e_probe(struct auxiliary_device *adev,
55045504

55055505
static void mlx5e_remove(struct auxiliary_device *adev)
55065506
{
5507-
struct mlx5e_priv *priv = dev_get_drvdata(&adev->dev);
5507+
struct mlx5e_priv *priv = auxiliary_get_drvdata(adev);
55085508
pm_message_t state = {};
55095509

55105510
mlx5e_dcbnl_delete_app(priv);

0 commit comments

Comments
 (0)