Skip to contentSkip to conversation

qtnfmac_pcie: Use dev_get_drvdata

PATCH In review Chuhong Yuan 1 participant 1 message Jul 24, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 9/10 qtnfmac_pcie: Use dev_get_drvdata

Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.

---
 drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c +2 -2
index e4e9344b6982..8ae318b5fe54 100644
@@ -430,7 +430,7 @@ static int qtnf_pcie_suspend(struct device *dev)
 	struct qtnf_pcie_bus_priv *priv;
 	struct qtnf_bus *bus;
 
-	bus = pci_get_drvdata(to_pci_dev(dev));
+	bus = dev_get_drvdata(dev);
 	if (!bus)
 		return -EFAULT;
 
@@ -443,7 +443,7 @@ static int qtnf_pcie_resume(struct device *dev)
 	struct qtnf_pcie_bus_priv *priv;
 	struct qtnf_bus *bus;
 
-	bus = pci_get_drvdata(to_pci_dev(dev));
+	bus = dev_get_drvdata(dev);
 	if (!bus)
 		return -EFAULT;
 
Signature · 1 line
2.20.1