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:
parent
ffa4d78cbc
commit
1f5f5ea72f
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue