]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
qtnfmac_pcie: Use dev_get_drvdata
authorChuhong Yuan <hslester96@gmail.com>
Wed, 24 Jul 2019 11:27:53 +0000 (19:27 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 6 Aug 2019 12:33:52 +0000 (15:33 +0300)
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: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c

index e4e9344b6982c8cf40235702dce16f019325c468..8ae318b5fe54646f962f3e5bf316ee6cb63e859f 100644 (file)
@@ -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;