diff options
author | Shannon Nelson <shannon.nelson@amd.com> | 2024-02-17 01:52:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-19 13:30:51 +0300 |
commit | 121e4dcba3700b30e63f25203d09ddfccbab4a09 (patch) | |
tree | 327fb39b7d71c35c40c9e8df2fb40e6d221cd35a /drivers/net/ethernet/pensando/ionic | |
parent | cd65c48d66920457129584553f217005d09b1edb (diff) | |
download | linux-121e4dcba3700b30e63f25203d09ddfccbab4a09.tar.xz |
ionic: use pci_is_enabled not open code
Since there is a utility available for this, use
the API rather than open code.
Fixes: 13943d6c8273 ("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>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index c49aa358e424..10a9d80db32c 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -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); } |