mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
ionic: use pci_is_enabled not open code
[ Upstream commit121e4dcba3
] Since there is a utility available for this, use the API rather than open code. Fixes:13943d6c82
("ionic: prevent pci disable of already disabled device") Reviewed-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a855d12979
commit
1ae3ff27c6
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user