Skip to content

Commit 121e4dc

Browse files
emuslndavem330
authored andcommitted
ionic: use pci_is_enabled not open code
Since there is a utility available for this, use the API rather than open code. Fixes: 13943d6 ("ionic: prevent pci disable of already disabled device") Reviewed-by: Brett Creeley <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cd65c48 commit 121e4dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static void ionic_clear_pci(struct ionic *ionic)
223223
ionic_unmap_bars(ionic);
224224
pci_release_regions(ionic->pdev);
225225

226-
if (atomic_read(&ionic->pdev->enable_cnt) > 0)
226+
if (pci_is_enabled(ionic->pdev))
227227
pci_disable_device(ionic->pdev);
228228
}
229229

0 commit comments

Comments
 (0)