aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuhong Yuan2019-07-23 22:16:24 +0800
committerDavid S. Miller2019-07-23 13:02:42 -0700
commit5daab287c67d8008a01e4a0db8bcb92b386b8adc (patch)
tree75e46c5c750855e898d47b2f2c1d6e9eff69d0b1
parent1c8aa7b1f15bff91a9abef3f083770793ea2f773 (diff)
igb: Use dev_get_drvdata where possible
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 749645d7f9b7..b63e77528a91 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -8880,8 +8880,7 @@ static int __maybe_unused igb_resume(struct device *dev)
static int __maybe_unused igb_runtime_idle(struct device *dev)
{
- struct pci_dev *pdev = to_pci_dev(dev);
- struct net_device *netdev = pci_get_drvdata(pdev);
+ struct net_device *netdev = dev_get_drvdata(dev);
struct igb_adapter *adapter = netdev_priv(netdev);
if (!igb_has_link(adapter))