mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
pci: Use conftest to find if pci_epc_event_ops struct has core_deinit
Use the conftest to find if the struct pci_epc_event_ops has
core_deinit as callback function. This callback is added
by Nvidia in core kernel.
Bug 4346767
Change-Id: I399197917ac7746ca367f55b9dc4e3a5bd79f073
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028740
(cherry picked from commit 1e9fc00bc2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128430
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
cbac517483
commit
83238f4563
@@ -5,6 +5,8 @@
|
||||
* Copyright (C) 2021-2024 NVIDIA Corporation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -168,7 +170,7 @@ static int pcie_dma_epf_core_init(struct pci_epf *epf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(NV_PCIE_DMA_EPF_CORE_DEINIT_NOT_AVAILABLE)
|
||||
#if defined(NV_PCI_EPC_EVENT_OPS_STRUCT_HAS_CORE_DEINIT) /* Nvidia Internal */
|
||||
static int pcie_dma_epf_core_deinit(struct pci_epf *epf)
|
||||
{
|
||||
struct pcie_epf_dma *epfnv = epf_get_drvdata(epf);
|
||||
@@ -269,7 +271,7 @@ static const struct pci_epf_device_id pcie_dma_epf_ids[] = {
|
||||
|
||||
static const struct pci_epc_event_ops pci_epf_dma_test_event_ops = {
|
||||
.core_init = pcie_dma_epf_core_init,
|
||||
#if !defined(NV_PCIE_DMA_EPF_CORE_DEINIT_NOT_AVAILABLE)
|
||||
#if defined(NV_PCI_EPC_EVENT_OPS_STRUCT_HAS_CORE_DEINIT) /* Nvidia Internal */
|
||||
.core_deinit = pcie_dma_epf_core_deinit,
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user