qtnfmac_pcie: Use dev_get_drvdata

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>
This commit is contained in:
Chuhong Yuan 2019-07-24 19:27:53 +08:00 committed by Kalle Valo
parent ffa4d78cbc
commit 1f5f5ea72f
1 changed files with 2 additions and 2 deletions

View 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;