Commit 121e4dcb authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

ionic: use pci_is_enabled not open code

Since there is a utility available for this, use
the API rather than open code.

Fixes: 13943d6c ("ionic: prevent pci disable of already disabled device")
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd65c48d
......@@ -223,7 +223,7 @@ static void ionic_clear_pci(struct ionic *ionic)
ionic_unmap_bars(ionic);
pci_release_regions(ionic->pdev);
if (atomic_read(&ionic->pdev->enable_cnt) > 0)
if (pci_is_enabled(ionic->pdev))
pci_disable_device(ionic->pdev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment