projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c8aa7b
)
igb: Use dev_get_drvdata where possible
author
Chuhong Yuan
<hslester96@gmail.com>
Tue, 23 Jul 2019 14:16:24 +0000
(22:16 +0800)
committer
David S. Miller
<davem@davemloft.net>
Tue, 23 Jul 2019 20:02:42 +0000
(13:02 -0700)
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>
drivers/net/ethernet/intel/igb/igb_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/intel/igb/igb_main.c
b/drivers/net/ethernet/intel/igb/igb_main.c
index 749645d7f9b77b59390bb1a9d14a0d0793f30466..b63e77528a91544e0e5041ef797b460db26a52b8 100644
(file)
--- 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))