mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-27 16:00:46 +09:00
mwifiex: 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:
@@ -150,10 +150,8 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter)
|
||||
static int mwifiex_pcie_suspend(struct device *dev)
|
||||
{
|
||||
struct mwifiex_adapter *adapter;
|
||||
struct pcie_service_card *card;
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct pcie_service_card *card = dev_get_drvdata(dev);
|
||||
|
||||
card = pci_get_drvdata(pdev);
|
||||
|
||||
/* Might still be loading firmware */
|
||||
wait_for_completion(&card->fw_done);
|
||||
@@ -195,10 +193,8 @@ static int mwifiex_pcie_suspend(struct device *dev)
|
||||
static int mwifiex_pcie_resume(struct device *dev)
|
||||
{
|
||||
struct mwifiex_adapter *adapter;
|
||||
struct pcie_service_card *card;
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct pcie_service_card *card = dev_get_drvdata(dev);
|
||||
|
||||
card = pci_get_drvdata(pdev);
|
||||
|
||||
if (!card->adapter) {
|
||||
dev_err(dev, "adapter structure is not valid\n");
|
||||
|
||||
Reference in New Issue
Block a user