ionic: use pci_is_enabled not open code
Subsystems (3)
PATCH 1/1 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 <[email protected]>
Signed-off-by Shannon Nelson <[email protected]>
--- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +1 -1
@@ -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); }
Signature · 1 line
2.17.1
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Fri, 16 Feb 2024 14:52:59 -0800 you wrote:
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 <[email protected]>Signed-off-by Shannon Nelson <[email protected]>[...]
Here is the summary with links:
- [net] ionic: use pci_is_enabled not open code
https://git.kernel.org/netdev/net/c/121e4dcba370
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html