drivers: Fix platform_driver remove for Linux v6.11

In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2024-07-26 16:10:31 +01:00
committed by mobile promotions
parent e7b93be004
commit 951b2423a8
93 changed files with 1412 additions and 174 deletions

View File

@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -850,9 +852,21 @@ static const struct of_device_id tegra_hv_vblk_oops_match[] = {
MODULE_DEVICE_TABLE(of, tegra_hv_vblk_oops_match);
#endif /* CONFIG_OF */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_vblk_oops_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_vblk_oops_remove(pdev);
}
#else
static inline int tegra_hv_vblk_oops_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_vblk_oops_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_vblk_oops_driver = {
.probe = tegra_hv_vblk_oops_probe,
.remove = tegra_hv_vblk_oops_remove,
.remove = tegra_hv_vblk_oops_remove_wrapper,
.driver = {
.name = OOPS_DRV_NAME,
.owner = THIS_MODULE,

View File

@@ -1564,9 +1564,21 @@ static struct of_device_id tegra_hv_vblk_match[] = {
MODULE_DEVICE_TABLE(of, tegra_hv_vblk_match);
#endif /* CONFIG_OF */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_vblk_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_vblk_remove(pdev);
}
#else
static inline int tegra_hv_vblk_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_vblk_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_vblk_driver = {
.probe = tegra_hv_vblk_probe,
.remove = tegra_hv_vblk_remove,
.remove = tegra_hv_vblk_remove_wrapper,
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,

View File

@@ -1,9 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/*
* Tegra AOCLUSTER Bus Driver
*/
#include <nvidia/conftest.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
@@ -32,9 +34,21 @@ static const struct of_device_id tegra_aocluster_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_aocluster_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_aocluster_remove_wrapper(struct platform_device *pdev)
{
tegra_aocluster_remove(pdev);
}
#else
static inline int tegra_aocluster_remove_wrapper(struct platform_device *pdev)
{
return tegra_aocluster_remove(pdev);
}
#endif
static struct platform_driver tegra_aocluster_driver = {
.probe = tegra_aocluster_probe,
.remove = tegra_aocluster_remove,
.remove = tegra_aocluster_remove_wrapper,
.driver = {
.name = "tegra-aocluster",
.of_match_table = tegra_aocluster_of_match,

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/cpu_cooling.h>
#include <linux/cpuidle.h>
@@ -227,9 +229,21 @@ static const struct of_device_id tegra_auto_cpuidle_of[] = {
{ },
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_auto_cpuidle_remove_wrapper(struct platform_device *pdev)
{
tegra_auto_cpuidle_remove(pdev);
}
#else
static inline int tegra_auto_cpuidle_remove_wrapper(struct platform_device *pdev)
{
return tegra_auto_cpuidle_remove(pdev);
}
#endif
static struct platform_driver tegra_auto_cpuidle_driver __refdata = {
.probe = tegra_auto_cpuidle_probe,
.remove = tegra_auto_cpuidle_remove,
.remove = tegra_auto_cpuidle_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "cpuidle_tegra_auto",

View File

@@ -6,6 +6,8 @@
* Cryptographic API.
*/
#include <nvidia/conftest.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
@@ -6003,9 +6005,21 @@ static const struct dev_pm_ops tegra_hv_pm_ops = {
};
#endif /* CONFIG_PM */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_vse_safety_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_vse_safety_remove(pdev);
}
#else
static inline int tegra_hv_vse_safety_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_vse_safety_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_vse_safety_driver = {
.probe = tegra_hv_vse_safety_probe,
.remove = tegra_hv_vse_safety_remove,
.remove = tegra_hv_vse_safety_remove_wrapper,
.shutdown = tegra_hv_vse_safety_shutdown,
.driver = {
.name = "tegra_hv_vse_safety",

View File

@@ -1,10 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* Support for Tegra NVRNG Engine Error Handling.
*/
#include <nvidia/conftest.h>
#include <asm/io.h>
#include <linux/acpi.h>
#include <linux/clk.h>
@@ -357,9 +359,21 @@ static const struct of_device_id tegra_se_nvrng_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_se_nvrng_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_se_nvrng_remove_wrapper(struct platform_device *pdev)
{
tegra_se_nvrng_remove(pdev);
}
#else
static inline int tegra_se_nvrng_remove_wrapper(struct platform_device *pdev)
{
return tegra_se_nvrng_remove(pdev);
}
#endif
static struct platform_driver tegra_se_nvrng_driver = {
.probe = tegra_se_nvrng_probe,
.remove = tegra_se_nvrng_remove,
.remove = tegra_se_nvrng_remove_wrapper,
.driver = {
.name = "tegra-se-nvrng",
.owner = THIS_MODULE,

View File

@@ -4,6 +4,8 @@
* Crypto driver for NVIDIA Security Engine in Tegra Chips
*/
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
@@ -384,13 +386,25 @@ static const struct of_device_id tegra_se_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_se_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_se_remove_wrapper(struct platform_device *pdev)
{
tegra_se_remove(pdev);
}
#else
static inline int tegra_se_remove_wrapper(struct platform_device *pdev)
{
return tegra_se_remove(pdev);
}
#endif
static struct platform_driver tegra_se_driver = {
.driver = {
.name = "tegra-se",
.of_match_table = tegra_se_of_match,
},
.probe = tegra_se_probe,
.remove = tegra_se_remove,
.remove = tegra_se_remove_wrapper,
};
static int tegra_se_host1x_probe(struct host1x_device *dev)

View File

@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2012 Avionic Design GmbH
* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2012-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -3295,11 +3295,23 @@ static int tegra_dc_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_dc_remove_wrapper(struct platform_device *pdev)
{
tegra_dc_remove(pdev);
}
#else
static inline int tegra_dc_remove_wrapper(struct platform_device *pdev)
{
return tegra_dc_remove(pdev);
}
#endif
struct platform_driver tegra_dc_driver = {
.driver = {
.name = "tegra-dc",
.of_match_table = tegra_dc_of_match,
},
.probe = tegra_dc_probe,
.remove = tegra_dc_remove,
.remove = tegra_dc_remove_wrapper,
};

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 NVIDIA Corporation
* SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -708,6 +708,18 @@ static const struct of_device_id tegra_dpaux_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_dpaux_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_dpaux_remove_wrapper(struct platform_device *pdev)
{
tegra_dpaux_remove(pdev);
}
#else
static inline int tegra_dpaux_remove_wrapper(struct platform_device *pdev)
{
return tegra_dpaux_remove(pdev);
}
#endif
struct platform_driver tegra_dpaux_driver = {
.driver = {
.name = "tegra-dpaux",
@@ -715,7 +727,7 @@ struct platform_driver tegra_dpaux_driver = {
.pm = &tegra_dpaux_pm_ops,
},
.probe = tegra_dpaux_probe,
.remove = tegra_dpaux_remove,
.remove = tegra_dpaux_remove_wrapper,
};
struct drm_dp_aux *drm_dp_aux_find_by_of_node(struct device_node *np)

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 NVIDIA Corporation
* SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -1692,11 +1692,23 @@ static const struct of_device_id tegra_dsi_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_dsi_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_dsi_remove_wrapper(struct platform_device *pdev)
{
tegra_dsi_remove(pdev);
}
#else
static inline int tegra_dsi_remove_wrapper(struct platform_device *pdev)
{
return tegra_dsi_remove(pdev);
}
#endif
struct platform_driver tegra_dsi_driver = {
.driver = {
.name = "tegra-dsi",
.of_match_table = tegra_dsi_of_match,
},
.probe = tegra_dsi_probe,
.remove = tegra_dsi_remove,
.remove = tegra_dsi_remove_wrapper,
};

View File

@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2012-2013, NVIDIA Corporation.
* SPDX-FileCopyrightText: Copyright (c) 2012-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/iommu.h>
@@ -392,6 +394,18 @@ static const struct dev_pm_ops tegra_gr2d_pm = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void gr2d_remove_wrapper(struct platform_device *pdev)
{
gr2d_remove(pdev);
}
#else
static inline int gr2d_remove_wrapper(struct platform_device *pdev)
{
return gr2d_remove(pdev);
}
#endif
struct platform_driver tegra_gr2d_driver = {
.driver = {
.name = "tegra-gr2d",
@@ -399,5 +413,5 @@ struct platform_driver tegra_gr2d_driver = {
.pm = &tegra_gr2d_pm,
},
.probe = gr2d_probe,
.remove = gr2d_remove,
.remove = gr2d_remove_wrapper,
};

View File

@@ -1,9 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 Avionic Design GmbH
* Copyright (C) 2013 NVIDIA Corporation
* SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/host1x-next.h>
@@ -631,6 +633,18 @@ static const struct dev_pm_ops tegra_gr3d_pm = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void gr3d_remove_wrapper(struct platform_device *pdev)
{
gr3d_remove(pdev);
}
#else
static inline int gr3d_remove_wrapper(struct platform_device *pdev)
{
return gr3d_remove(pdev);
}
#endif
struct platform_driver tegra_gr3d_driver = {
.driver = {
.name = "tegra-gr3d",
@@ -638,5 +652,5 @@ struct platform_driver tegra_gr3d_driver = {
.pm = &tegra_gr3d_pm,
},
.probe = gr3d_probe,
.remove = gr3d_remove,
.remove = gr3d_remove_wrapper,
};

View File

@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2012 Avionic Design GmbH
* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2012-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -1909,11 +1909,23 @@ static int tegra_hdmi_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hdmi_remove_wrapper(struct platform_device *pdev)
{
tegra_hdmi_remove(pdev);
}
#else
static inline int tegra_hdmi_remove_wrapper(struct platform_device *pdev)
{
return tegra_hdmi_remove(pdev);
}
#endif
struct platform_driver tegra_hdmi_driver = {
.driver = {
.name = "tegra-hdmi",
.of_match_table = tegra_hdmi_of_match,
},
.probe = tegra_hdmi_probe,
.remove = tegra_hdmi_remove,
.remove = tegra_hdmi_remove_wrapper,
};

View File

@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2017 NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
@@ -1215,11 +1217,23 @@ static const struct of_device_id tegra_display_hub_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_display_hub_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_display_hub_remove_wrapper(struct platform_device *pdev)
{
tegra_display_hub_remove(pdev);
}
#else
static inline int tegra_display_hub_remove_wrapper(struct platform_device *pdev)
{
return tegra_display_hub_remove(pdev);
}
#endif
struct platform_driver tegra_display_hub_driver = {
.driver = {
.name = "tegra-display-hub",
.of_match_table = tegra_display_hub_of_match,
},
.probe = tegra_display_hub_probe,
.remove = tegra_display_hub_remove,
.remove = tegra_display_hub_remove_wrapper,
};

View File

@@ -3,6 +3,8 @@
* SPDX-FileCopyrightText: Copyright (c) 2015-2024, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved.
*/
#include <nvidia/conftest.h>
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
@@ -964,6 +966,18 @@ static const struct dev_pm_ops nvdec_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvdec_remove_wrapper(struct platform_device *pdev)
{
nvdec_remove(pdev);
}
#else
static inline int nvdec_remove_wrapper(struct platform_device *pdev)
{
return nvdec_remove(pdev);
}
#endif
struct platform_driver tegra_nvdec_driver = {
.driver = {
.name = "tegra-nvdec",
@@ -971,7 +985,7 @@ struct platform_driver tegra_nvdec_driver = {
.pm = &nvdec_pm_ops
},
.probe = nvdec_probe,
.remove = nvdec_remove,
.remove = nvdec_remove_wrapper,
};
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)

View File

@@ -794,6 +794,18 @@ static const struct dev_pm_ops nvenc_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvenc_remove_wrapper(struct platform_device *pdev)
{
nvenc_remove(pdev);
}
#else
static inline int nvenc_remove_wrapper(struct platform_device *pdev)
{
return nvenc_remove(pdev);
}
#endif
struct platform_driver tegra_nvenc_driver = {
.driver = {
.name = "tegra-nvenc",
@@ -801,7 +813,7 @@ struct platform_driver tegra_nvenc_driver = {
.pm = &nvenc_pm_ops
},
.probe = nvenc_probe,
.remove = nvenc_remove,
.remove = nvenc_remove_wrapper,
};
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)

View File

@@ -3,6 +3,8 @@
* SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved.
*/
#include <nvidia/conftest.h>
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
@@ -746,6 +748,18 @@ static const struct dev_pm_ops nvjpg_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvjpg_remove_wrapper(struct platform_device *pdev)
{
nvjpg_remove(pdev);
}
#else
static inline int nvjpg_remove_wrapper(struct platform_device *pdev)
{
return nvjpg_remove(pdev);
}
#endif
struct platform_driver tegra_nvjpg_driver = {
.driver = {
.name = "tegra-nvjpg",
@@ -753,7 +767,7 @@ struct platform_driver tegra_nvjpg_driver = {
.pm = &nvjpg_pm_ops
},
.probe = nvjpg_probe,
.remove = nvjpg_remove,
.remove = nvjpg_remove_wrapper,
};
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA Corporation.
* SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <linux/clk.h>
@@ -668,6 +668,18 @@ static const struct dev_pm_ops ofa_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void ofa_remove_wrapper(struct platform_device *pdev)
{
ofa_remove(pdev);
}
#else
static inline int ofa_remove_wrapper(struct platform_device *pdev)
{
return ofa_remove(pdev);
}
#endif
struct platform_driver tegra_ofa_driver = {
.driver = {
.name = "tegra-ofa",
@@ -675,7 +687,7 @@ struct platform_driver tegra_ofa_driver = {
.pm = &ofa_pm_ops
},
.probe = ofa_probe,
.remove = ofa_remove,
.remove = ofa_remove_wrapper,
};
#if IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 NVIDIA Corporation
* SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -4082,6 +4082,18 @@ static const struct dev_pm_ops tegra_sor_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(tegra_sor_suspend, tegra_sor_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_sor_remove_wrapper(struct platform_device *pdev)
{
tegra_sor_remove(pdev);
}
#else
static inline int tegra_sor_remove_wrapper(struct platform_device *pdev)
{
return tegra_sor_remove(pdev);
}
#endif
struct platform_driver tegra_sor_driver = {
.driver = {
.name = "tegra-sor",
@@ -4089,5 +4101,5 @@ struct platform_driver tegra_sor_driver = {
.pm = &tegra_sor_pm_ops,
},
.probe = tegra_sor_probe,
.remove = tegra_sor_remove,
.remove = tegra_sor_remove_wrapper,
};

View File

@@ -868,6 +868,18 @@ static const struct dev_pm_ops vic_pm_ops = {
#endif
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void vic_remove_wrapper(struct platform_device *pdev)
{
vic_remove(pdev);
}
#else
static inline int vic_remove_wrapper(struct platform_device *pdev)
{
return vic_remove(pdev);
}
#endif
struct platform_driver tegra_vic_driver = {
.driver = {
.name = "tegra-vic",
@@ -875,7 +887,7 @@ struct platform_driver tegra_vic_driver = {
.pm = &vic_pm_ops
},
.probe = vic_probe,
.remove = vic_remove,
.remove = vic_remove_wrapper,
};
#if IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC)

View File

@@ -3,6 +3,8 @@
* Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/debugfs.h>
#include <linux/host1x-next.h>
#include <linux/module.h>
@@ -755,6 +757,18 @@ static const struct dev_pm_ops virt_engine_pm_ops = {
#endif
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void virt_engine_remove_wrapper(struct platform_device *pdev)
{
virt_engine_remove(pdev);
}
#else
static inline int virt_engine_remove_wrapper(struct platform_device *pdev)
{
return virt_engine_remove(pdev);
}
#endif
struct platform_driver tegra_virt_engine_driver = {
.driver = {
.name = "tegra-host1x-virtual-engine",
@@ -762,5 +776,5 @@ struct platform_driver tegra_virt_engine_driver = {
.pm = &virt_engine_pm_ops,
},
.probe = virt_engine_probe,
.remove = virt_engine_remove,
.remove = virt_engine_remove_wrapper,
};

View File

@@ -2,7 +2,7 @@
/*
* Tegra host1x driver
*
* Copyright (c) 2010-2023, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved.
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -1102,6 +1102,18 @@ static const struct dev_pm_ops host1x_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(host1x_runtime_suspend, host1x_runtime_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void host1x_remove_wrapper(struct platform_device *pdev)
{
host1x_remove(pdev);
}
#else
static inline int host1x_remove_wrapper(struct platform_device *pdev)
{
return host1x_remove(pdev);
}
#endif
static struct platform_driver tegra_host1x_driver = {
.driver = {
.name = "tegra-host1x",
@@ -1109,7 +1121,7 @@ static struct platform_driver tegra_host1x_driver = {
.pm = &host1x_pm_ops,
},
.probe = host1x_probe,
.remove = host1x_remove,
.remove = host1x_remove_wrapper,
};
static struct platform_driver * const drivers[] = {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2013 NVIDIA Corporation
* SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -20,6 +20,8 @@
* OF THIS SOFTWARE.
*/
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/host1x-next.h>
#include <linux/io.h>
@@ -546,11 +548,23 @@ static int tegra_mipi_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_mipi_remove_wrapper(struct platform_device *pdev)
{
tegra_mipi_remove(pdev);
}
#else
static inline int tegra_mipi_remove_wrapper(struct platform_device *pdev)
{
return tegra_mipi_remove(pdev);
}
#endif
struct platform_driver tegra_mipi_driver = {
.driver = {
.name = "tegra-mipi",
.of_match_table = tegra_mipi_of_match,
},
.probe = tegra_mipi_probe,
.remove = tegra_mipi_remove,
.remove = tegra_mipi_remove_wrapper,
};

View File

@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
@@ -443,9 +445,21 @@ static const struct of_device_id tegra_i2cslv_of_match[] = {
MODULE_DEVICE_TABLE(of, tegra_i2cslv_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_i2cslv_remove_wrapper(struct platform_device *pdev)
{
tegra_i2cslv_remove(pdev);
}
#else
static inline int tegra_i2cslv_remove_wrapper(struct platform_device *pdev)
{
return tegra_i2cslv_remove(pdev);
}
#endif
static struct platform_driver tegra_i2cslv_driver = {
.probe = tegra_i2cslv_probe,
.remove = tegra_i2cslv_remove,
.remove = tegra_i2cslv_remove_wrapper,
.driver = {
.name = "tegra-i2cslv",
.owner = THIS_MODULE,

View File

@@ -1247,6 +1247,18 @@ MODULE_DEVICE_TABLE(of, cam_fsync_of_match);
static SIMPLE_DEV_PM_OPS(cam_fsync_pm, cam_fsync_suspend, cam_fsync_resume);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void cam_fsync_remove_wrapper(struct platform_device *pdev)
{
cam_fsync_remove(pdev);
}
#else
static inline int cam_fsync_remove_wrapper(struct platform_device *pdev)
{
return cam_fsync_remove(pdev);
}
#endif
static struct platform_driver cam_fsync_driver = {
.driver = {
.name = "cam_fsync",
@@ -1255,7 +1267,7 @@ static struct platform_driver cam_fsync_driver = {
.pm = &cam_fsync_pm,
},
.probe = cam_fsync_probe,
.remove = cam_fsync_remove,
.remove = cam_fsync_remove_wrapper,
};
module_platform_driver(cam_fsync_driver);

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/**
@@ -2119,9 +2119,21 @@ static const struct of_device_id capture_isp_of_match[] = {
{ },
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void capture_isp_remove_wrapper(struct platform_device *pdev)
{
capture_isp_remove(pdev);
}
#else
static inline int capture_isp_remove_wrapper(struct platform_device *pdev)
{
return capture_isp_remove(pdev);
}
#endif
static struct platform_driver capture_isp_driver = {
.probe = capture_isp_probe,
.remove = capture_isp_remove,
.remove = capture_isp_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "tegra-camrtc-capture-isp",

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/**
@@ -7,6 +7,8 @@
* @brief VI channel operations for the T234 Camera RTCPU platform.
*/
#include <nvidia/conftest.h>
#include <linux/completion.h>
#include <linux/nospec.h>
#include <linux/nvhost.h>
@@ -1709,9 +1711,21 @@ static const struct of_device_id capture_vi_of_match[] = {
};
MODULE_DEVICE_TABLE(of, capture_vi_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void capture_vi_remove_wrapper(struct platform_device *pdev)
{
capture_vi_remove(pdev);
}
#else
static inline int capture_vi_remove_wrapper(struct platform_device *pdev)
{
return capture_vi_remove(pdev);
}
#endif
static struct platform_driver capture_vi_driver = {
.probe = capture_vi_probe,
.remove = capture_vi_remove,
.remove = capture_vi_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "tegra-camrtc-capture-vi",

View File

@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved. */
/* SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved. */
/*
* cam_cdi_tsc.c - tsc driver.
*/
@@ -629,6 +629,18 @@ MODULE_DEVICE_TABLE(of, cdi_tsc_of_match);
static SIMPLE_DEV_PM_OPS(cdi_tsc_pm, cdi_tsc_suspend, cdi_tsc_resume);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void cdi_tsc_remove_wrapper(struct platform_device *pdev)
{
cdi_tsc_remove(pdev);
}
#else
static inline int cdi_tsc_remove_wrapper(struct platform_device *pdev)
{
return cdi_tsc_remove(pdev);
}
#endif
static struct platform_driver cdi_tsc_driver = {
.driver = {
.name = "cdi_tsc",
@@ -637,7 +649,7 @@ static struct platform_driver cdi_tsc_driver = {
.pm = &cdi_tsc_pm,
},
.probe = cdi_tsc_probe,
.remove = cdi_tsc_remove,
.remove = cdi_tsc_remove_wrapper,
};
module_platform_driver(cdi_tsc_driver);

View File

@@ -330,9 +330,21 @@ static const struct of_device_id cdi_gpio_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, cdi_gpio_dt_ids);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void cdi_gpio_remove_wrapper(struct platform_device *pdev)
{
cdi_gpio_remove(pdev);
}
#else
static inline int cdi_gpio_remove_wrapper(struct platform_device *pdev)
{
return cdi_gpio_remove(pdev);
}
#endif
static struct platform_driver cdi_gpio_driver = {
.probe = cdi_gpio_probe,
.remove = cdi_gpio_remove,
.remove = cdi_gpio_remove_wrapper,
.driver = {
.name = "cdi-gpio",
.of_match_table = cdi_gpio_dt_ids,

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (C) 2015-2024 NVIDIA CORPORATION. All rights reserved.
#include <nvidia/conftest.h>
@@ -2050,6 +2050,18 @@ static const struct of_device_id cdi_mgr_of_match[] = {
};
MODULE_DEVICE_TABLE(of, cdi_mgr_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void cdi_mgr_remove_wrapper(struct platform_device *pdev)
{
cdi_mgr_remove(pdev);
}
#else
static inline int cdi_mgr_remove_wrapper(struct platform_device *pdev)
{
return cdi_mgr_remove(pdev);
}
#endif
static struct platform_driver cdi_mgr_driver = {
.driver = {
.name = "cdi-mgr",
@@ -2058,7 +2070,7 @@ static struct platform_driver cdi_mgr_driver = {
.pm = &cdi_mgr_pm_ops,
},
.probe = cdi_mgr_probe,
.remove = cdi_mgr_remove,
.remove = cdi_mgr_remove_wrapper,
};
module_platform_driver(cdi_mgr_driver);

View File

@@ -253,6 +253,18 @@ static const struct dev_pm_ops cdi_pwm_pm_ops = {
.runtime_resume = cdi_pwm_resume,
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void cdi_pwm_remove_wrapper(struct platform_device *pdev)
{
cdi_pwm_remove(pdev);
}
#else
static inline int cdi_pwm_remove_wrapper(struct platform_device *pdev)
{
return cdi_pwm_remove(pdev);
}
#endif
static struct platform_driver cdi_pwm_driver = {
.driver = {
.name = "cdi-pwm",
@@ -261,7 +273,7 @@ static struct platform_driver cdi_pwm_driver = {
.pm = &cdi_pwm_pm_ops,
},
.probe = cdi_pwm_probe,
.remove = cdi_pwm_remove,
.remove = cdi_pwm_remove_wrapper,
};
module_platform_driver(cdi_pwm_driver);

View File

@@ -330,9 +330,21 @@ static const struct of_device_id isc_gpio_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, isc_gpio_dt_ids);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void isc_gpio_remove_wrapper(struct platform_device *pdev)
{
isc_gpio_remove(pdev);
}
#else
static inline int isc_gpio_remove_wrapper(struct platform_device *pdev)
{
return isc_gpio_remove(pdev);
}
#endif
static struct platform_driver isc_gpio_driver = {
.probe = isc_gpio_probe,
.remove = isc_gpio_remove,
.remove = isc_gpio_remove_wrapper,
.driver = {
.name = "isc-gpio",
.of_match_table = isc_gpio_dt_ids,

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2015-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
@@ -1204,6 +1204,18 @@ static const struct of_device_id isc_mgr_of_match[] = {
};
MODULE_DEVICE_TABLE(of, isc_mgr_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void isc_mgr_remove_wrapper(struct platform_device *pdev)
{
isc_mgr_remove(pdev);
}
#else
static inline int isc_mgr_remove_wrapper(struct platform_device *pdev)
{
return isc_mgr_remove(pdev);
}
#endif
static struct platform_driver isc_mgr_driver = {
.driver = {
.name = "isc-mgr",
@@ -1212,7 +1224,7 @@ static struct platform_driver isc_mgr_driver = {
.pm = &isc_mgr_pm_ops,
},
.probe = isc_mgr_probe,
.remove = isc_mgr_remove,
.remove = isc_mgr_remove_wrapper,
};
module_platform_driver(isc_mgr_driver);

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2016-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2016-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
@@ -253,6 +253,18 @@ static const struct dev_pm_ops isc_pwm_pm_ops = {
.runtime_resume = isc_pwm_resume,
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void isc_pwm_remove_wrapper(struct platform_device *pdev)
{
isc_pwm_remove(pdev);
}
#else
static inline int isc_pwm_remove_wrapper(struct platform_device *pdev)
{
return isc_pwm_remove(pdev);
}
#endif
static struct platform_driver isc_pwm_driver = {
.driver = {
.name = "isc-pwm",
@@ -261,7 +273,7 @@ static struct platform_driver isc_pwm_driver = {
.pm = &isc_pwm_pm_ops,
},
.probe = isc_pwm_probe,
.remove = isc_pwm_remove,
.remove = isc_pwm_remove_wrapper,
};
module_platform_driver(isc_pwm_driver);

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (C) 2019-2023 NVIDIA CORPORATION. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
@@ -591,9 +591,21 @@ static struct of_device_id bdroid_of_match[] = {
};
MODULE_DEVICE_TABLE(of, bdroid_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void bluedroid_pm_remove_wrapper(struct platform_device *pdev)
{
bluedroid_pm_remove(pdev);
}
#else
static inline int bluedroid_pm_remove_wrapper(struct platform_device *pdev)
{
return bluedroid_pm_remove(pdev);
}
#endif
static struct platform_driver bluedroid_pm_driver = {
.probe = bluedroid_pm_probe,
.remove = bluedroid_pm_remove,
.remove = bluedroid_pm_remove_wrapper,
.suspend = bluedroid_pm_suspend,
.resume = bluedroid_pm_resume,
.shutdown = bluedroid_pm_shutdown,

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
/*
@@ -822,9 +822,21 @@ exit:
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvsciipc_remove_wrapper(struct platform_device *pdev)
{
nvsciipc_remove(pdev);
}
#else
static inline int nvsciipc_remove_wrapper(struct platform_device *pdev)
{
return nvsciipc_remove(pdev);
}
#endif
static struct platform_driver nvsciipc_driver = {
.probe = nvsciipc_probe,
.remove = nvsciipc_remove,
.remove = nvsciipc_remove_wrapper,
.driver = {
.name = MODULE_NAME,
},

View File

@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h> /* printk() */
@@ -726,9 +728,21 @@ static struct of_device_id tegra_virt_mtd_match[] = {
MODULE_DEVICE_TABLE(of, tegra_virt_mtd_match);
#endif /* CONFIG_OF */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_virt_mtd_remove_wrapper(struct platform_device *pdev)
{
tegra_virt_mtd_remove(pdev);
}
#else
static inline int tegra_virt_mtd_remove_wrapper(struct platform_device *pdev)
{
return tegra_virt_mtd_remove(pdev);
}
#endif
static struct platform_driver tegra_virt_mtd_driver = {
.probe = tegra_virt_mtd_probe,
.remove = tegra_virt_mtd_remove,
.remove = tegra_virt_mtd_remove_wrapper,
.driver = {
.name = "Virtual MTD device",
.owner = THIS_MODULE,

View File

@@ -2007,6 +2007,18 @@ static int mttcan_resume(struct platform_device *pdev)
}
#endif
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void mttcan_remove_wrapper(struct platform_device *pdev)
{
mttcan_remove(pdev);
}
#else
static inline int mttcan_remove_wrapper(struct platform_device *pdev)
{
return mttcan_remove(pdev);
}
#endif
static struct platform_driver mttcan_plat_driver = {
.driver = {
.name = KBUILD_MODNAME,
@@ -2014,7 +2026,7 @@ static struct platform_driver mttcan_plat_driver = {
.of_match_table = of_match_ptr(mttcan_of_table),
},
.probe = mttcan_probe,
.remove = mttcan_remove,
.remove = mttcan_remove_wrapper,
#ifdef CONFIG_PM
.suspend = mttcan_suspend,
.resume = mttcan_resume,

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
* SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* This software product is a proprietary product of Nvidia Corporation and its affiliates
* (the "Company") and all right, title, and interest in and to the software
@@ -10,9 +10,10 @@
* provided with the software product.
*/
#include <nvidia/conftest.h>
#include "bf3_livefish.h"
#include <linux/acpi.h>
#include <linux/errno.h>
#include <linux/io.h>
@@ -338,6 +339,18 @@ static const struct acpi_device_id livefish_acpi_match[] = {
};
MODULE_DEVICE_TABLE(acpi, livefish_acpi_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void livefish_remove_wrapper(struct platform_device *pdev)
{
livefish_remove(pdev);
}
#else
static inline int livefish_remove_wrapper(struct platform_device *pdev)
{
return livefish_remove(pdev);
}
#endif
static struct platform_driver livefish_driver = {
.driver = {
.name = "mlxbf-livefish",
@@ -345,7 +358,7 @@ static struct platform_driver livefish_driver = {
.acpi_match_table = ACPI_PTR(livefish_acpi_match),
},
.probe = livefish_probe,
.remove = livefish_remove,
.remove = livefish_remove_wrapper,
};

View File

@@ -7950,12 +7950,24 @@ static const struct of_device_id ether_of_match[] = {
};
MODULE_DEVICE_TABLE(of, ether_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void ether_remove_wrapper(struct platform_device *pdev)
{
ether_remove(pdev);
}
#else
static inline int ether_remove_wrapper(struct platform_device *pdev)
{
return ether_remove(pdev);
}
#endif
/**
* @brief Ethernet platform driver instance
*/
static struct platform_driver ether_driver = {
.probe = ether_probe,
.remove = ether_remove,
.remove = ether_remove_wrapper,
.shutdown = ether_shutdown,
.driver = {
.name = "nvethernet",

View File

@@ -13,6 +13,8 @@
*
*****************************************************************************/
#include <nvidia/conftest.h>
#ifdef CONFIG_GPIO_WAKEUP
#include <linux/gpio.h>
#endif
@@ -1275,10 +1277,22 @@ static int wifi_resume(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void wifi_remove_wrapper(struct platform_device *pdev)
{
wifi_remove(pdev);
}
#else
static inline int wifi_remove_wrapper(struct platform_device *pdev)
{
return wifi_remove(pdev);
}
#endif
/* temporarily use these two */
static struct platform_driver wifi_device = {
.probe = wifi_probe,
.remove = wifi_remove,
.remove = wifi_remove_wrapper,
.suspend = wifi_suspend,
.resume = wifi_resume,
#ifdef RTW_SUPPORT_PLATFORM_SHUTDOWN
@@ -1289,9 +1303,21 @@ static struct platform_driver wifi_device = {
}
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void wifi_remove_wrapper(struct platform_device *pdev)
{
wifi_remove(pdev);
}
#else
static inline int wifi_remove_wrapper(struct platform_device *pdev)
{
return wifi_remove(pdev);
}
#endif
static struct platform_driver wifi_device_legacy = {
.probe = wifi_probe,
.remove = wifi_remove,
.remove = wifi_remove_wrapper,
.suspend = wifi_suspend,
.resume = wifi_resume,
.driver = {

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/kobject.h>
@@ -263,9 +265,21 @@ static int nvpmodel_clk_cap_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvpmodel_clk_cap_remove_wrapper(struct platform_device *pdev)
{
nvpmodel_clk_cap_remove(pdev);
}
#else
static inline int nvpmodel_clk_cap_remove_wrapper(struct platform_device *pdev)
{
return nvpmodel_clk_cap_remove(pdev);
}
#endif
static struct platform_driver nvpmodel_clk_cap_driver = {
.probe = nvpmodel_clk_cap_probe,
.remove = nvpmodel_clk_cap_remove,
.remove = nvpmodel_clk_cap_remove_wrapper,
.driver = {
.name = "nvpmodel-clk-cap",
.of_match_table = of_nvpmodel_clk_cap_match,

View File

@@ -1189,6 +1189,18 @@ MODULE_DEVICE_TABLE(of, nvpps_of_table);
#endif /* !NVPPS_NO_DT */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvpps_remove_wrapper(struct platform_device *pdev)
{
nvpps_remove(pdev);
}
#else
static inline int nvpps_remove_wrapper(struct platform_device *pdev)
{
return nvpps_remove(pdev);
}
#endif
static struct platform_driver nvpps_plat_driver = {
.driver = {
.name = KBUILD_MODNAME,
@@ -1198,7 +1210,7 @@ static struct platform_driver nvpps_plat_driver = {
#endif /* !NVPPS_NO_DT */
},
.probe = nvpps_probe,
.remove = nvpps_remove,
.remove = nvpps_remove_wrapper,
#ifdef CONFIG_PM
.suspend = nvpps_suspend,
.resume = nvpps_resume,

View File

@@ -1,11 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
/*
* PCIe driver to enumerate PCIe virtual functions in VM.
*
* Copyright (C) 2021-2022, NVIDIA Corporation. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
*/
#include <nvidia/conftest.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -142,13 +144,25 @@ static const struct of_device_id pci_tegra_vf_of_match[] = {
};
MODULE_DEVICE_TABLE(of, pci_tegra_vf_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void pci_tegra_vf_remove_wrapper(struct platform_device *pdev)
{
pci_tegra_vf_remove(pdev);
}
#else
static inline int pci_tegra_vf_remove_wrapper(struct platform_device *pdev)
{
return pci_tegra_vf_remove(pdev);
}
#endif
static struct platform_driver pci_tegra_vf_driver = {
.driver = {
.name = "pcie-tegra-vf",
.of_match_table = pci_tegra_vf_of_match,
},
.probe = pci_tegra_vf_probe,
.remove = pci_tegra_vf_remove,
.remove = pci_tegra_vf_remove_wrapper,
};
module_platform_driver(pci_tegra_vf_driver);

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2017-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/device.h>
#include <linux/mailbox_client.h>
@@ -112,9 +114,21 @@ static const struct of_device_id tegra_aon_ivc_echo_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_aon_ivc_echo_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_aon_ivc_echo_remove_wrapper(struct platform_device *pdev)
{
tegra_aon_ivc_echo_remove(pdev);
}
#else
static inline int tegra_aon_ivc_echo_remove_wrapper(struct platform_device *pdev)
{
return tegra_aon_ivc_echo_remove(pdev);
}
#endif
static struct platform_driver tegra_aon_ivc_echo_driver = {
.probe = tegra_aon_ivc_echo_probe,
.remove = tegra_aon_ivc_echo_remove,
.remove = tegra_aon_ivc_echo_remove_wrapper,
.driver = {
.name = "tegra-aon-ivc-echo",
.of_match_table = tegra_aon_ivc_echo_match,

View File

@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -161,13 +163,25 @@ static const struct of_device_id tegra_aon_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_aon_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_aon_remove_wrapper(struct platform_device *pdev)
{
tegra_aon_remove(pdev);
}
#else
static inline int tegra_aon_remove_wrapper(struct platform_device *pdev)
{
return tegra_aon_remove(pdev);
}
#endif
static struct platform_driver tegra234_aon_driver = {
.driver = {
.name = "tegra234-aon",
.of_match_table = tegra_aon_of_match,
},
.probe = tegra_aon_probe,
.remove = tegra_aon_remove,
.remove = tegra_aon_remove_wrapper,
};
module_platform_driver(tegra234_aon_driver);

View File

@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <nvidia/conftest.h>
#include <dce.h>
#include <linux/module.h>
#include <linux/interrupt.h>
@@ -318,6 +320,18 @@ static const struct dev_pm_ops dce_pm_ops = {
};
#endif
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_dce_remove_wrapper(struct platform_device *pdev)
{
tegra_dce_remove(pdev);
}
#else
static inline int tegra_dce_remove_wrapper(struct platform_device *pdev)
{
return tegra_dce_remove(pdev);
}
#endif
static struct platform_driver tegra_dce_driver = {
.driver = {
.name = "tegra-dce",
@@ -328,7 +342,7 @@ static struct platform_driver tegra_dce_driver = {
#endif
},
.probe = tegra_dce_probe,
.remove = tegra_dce_remove,
.remove = tegra_dce_remove_wrapper,
};
module_platform_driver(tegra_dce_driver);

View File

@@ -1,10 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#define pr_fmt(fmt) "mc-hwpm: " fmt
#include <nvidia/conftest.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
@@ -145,6 +147,18 @@ static int tegra_mc_hwpm_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_mc_hwpm_remove_wrapper(struct platform_device *pdev)
{
tegra_mc_hwpm_remove(pdev);
}
#else
static inline int tegra_mc_hwpm_remove_wrapper(struct platform_device *pdev)
{
return tegra_mc_hwpm_remove(pdev);
}
#endif
static struct platform_driver mc_hwpm_driver = {
.driver = {
.name = "tegra-mc-hwpm",
@@ -153,7 +167,7 @@ static struct platform_driver mc_hwpm_driver = {
},
.probe = tegra_mc_hwpm_hwpm_probe,
.remove = tegra_mc_hwpm_remove,
.remove = tegra_mc_hwpm_remove_wrapper,
};
static int __init tegra_mc_hwpm_init(void)

View File

@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
#include <nvidia/conftest.h>
#include <linux/cpumask.h>
#include <linux/delay.h>
#include <linux/io.h>
@@ -580,9 +582,21 @@ static const struct of_device_id t23x_mce_of_match[] = {
};
MODULE_DEVICE_TABLE(of, t23x_mce_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void t23x_mce_remove_wrapper(struct platform_device *pdev)
{
t23x_mce_remove(pdev);
}
#else
static inline int t23x_mce_remove_wrapper(struct platform_device *pdev)
{
return t23x_mce_remove(pdev);
}
#endif
static struct platform_driver t23x_mce_driver = {
.probe = t23x_mce_probe,
.remove = t23x_mce_remove,
.remove = t23x_mce_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "t23x-mce",

View File

@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2014-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/platform_device.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
@@ -648,6 +650,18 @@ static const struct of_device_id nvadsp_of_match[] = {
};
MODULE_DEVICE_TABLE(of, nvadsp_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvadsp_remove_wrapper(struct platform_device *pdev)
{
nvadsp_remove(pdev);
}
#else
static inline int nvadsp_remove_wrapper(struct platform_device *pdev)
{
return nvadsp_remove(pdev);
}
#endif
static struct platform_driver nvadsp_driver __refdata = {
.driver = {
.name = "nvadsp",
@@ -656,7 +670,7 @@ static struct platform_driver nvadsp_driver __refdata = {
.of_match_table = of_match_ptr(nvadsp_of_match),
},
.probe = nvadsp_probe,
.remove = nvadsp_remove,
.remove = nvadsp_remove_wrapper,
};
module_platform_driver(nvadsp_driver);

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/acpi.h>
#include <linux/module.h>
@@ -295,9 +297,21 @@ static const struct acpi_device_id tegra23x_psc_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, tegra23x_psc_acpi_match);
#endif
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra234_psc_remove_wrapper(struct platform_device *pdev)
{
tegra234_psc_remove(pdev);
}
#else
static inline int tegra234_psc_remove_wrapper(struct platform_device *pdev)
{
return tegra234_psc_remove(pdev);
}
#endif
static struct platform_driver tegra234_psc_driver = {
.probe = tegra234_psc_probe,
.remove = tegra234_psc_remove,
.remove = tegra234_psc_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "tegra23x-psc",

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/tegra-camera-rtcpu.h>
@@ -966,6 +968,18 @@ static const struct dev_pm_ops tegra_cam_rtcpu_pm_ops = {
.runtime_idle = tegra_cam_rtcpu_runtime_idle,
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_cam_rtcpu_remove_wrapper(struct platform_device *pdev)
{
tegra_cam_rtcpu_remove(pdev);
}
#else
static inline int tegra_cam_rtcpu_remove_wrapper(struct platform_device *pdev)
{
return tegra_cam_rtcpu_remove(pdev);
}
#endif
static struct platform_driver tegra_cam_rtcpu_driver = {
.driver = {
.name = "tegra186-cam-rtcpu",
@@ -976,7 +990,7 @@ static struct platform_driver tegra_cam_rtcpu_driver = {
#endif
},
.probe = tegra_cam_rtcpu_probe,
.remove = tegra_cam_rtcpu_remove,
.remove = tegra_cam_rtcpu_remove_wrapper,
.shutdown = tegra_cam_rtcpu_shutdown,
};
module_platform_driver(tegra_cam_rtcpu_driver);

View File

@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2023-2024 NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/device.h>
@@ -138,9 +140,21 @@ static const struct of_device_id central_actmon_of_match[] = {
};
MODULE_DEVICE_TABLE(of, central_actmon_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void central_actmon_remove_wrapper(struct platform_device *pdev)
{
central_actmon_remove(pdev);
}
#else
static inline int central_actmon_remove_wrapper(struct platform_device *pdev)
{
return central_actmon_remove(pdev);
}
#endif
static struct platform_driver central_actmon_driver = {
.probe = central_actmon_probe,
.remove = central_actmon_remove,
.remove = central_actmon_remove_wrapper,
.driver = {
.name = "tegra-cactmon-mc-all",
.owner = THIS_MODULE,

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
@@ -463,6 +463,18 @@ static int __maybe_unused fsicom_client_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(fsicom_client_pm, fsicom_client_suspend, fsicom_client_resume);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void fsicom_client_remove_wrapper(struct platform_device *pdev)
{
fsicom_client_remove(pdev);
}
#else
static inline int fsicom_client_remove_wrapper(struct platform_device *pdev)
{
return fsicom_client_remove(pdev);
}
#endif
static struct platform_driver fsicom_client = {
.driver = {
.name = "fsicom_client",
@@ -472,7 +484,7 @@ static struct platform_driver fsicom_client = {
},
.probe = fsicom_client_probe,
.shutdown = fsicom_client_shutdown,
.remove = fsicom_client_remove,
.remove = fsicom_client_remove_wrapper,
};
module_platform_driver(fsicom_client);

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2016-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/*
* tegra-hv-xhci-debug: Tegra Hypervisor XHCI server debug
@@ -12,6 +12,8 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include <nvidia/conftest.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -331,9 +333,21 @@ static const struct of_device_id tegra_hv_xhci_debug_match[] = {
MODULE_DEVICE_TABLE(of, tegra_hv_xhci_debug_match);
#endif /* CONFIG_OF */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_xhci_debug_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_xhci_debug_remove(pdev);
}
#else
static inline int tegra_hv_xhci_debug_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_xhci_debug_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_xhci_debug_platform_driver = {
.probe = tegra_hv_xhci_debug_probe,
.remove = tegra_hv_xhci_debug_remove,
.remove = tegra_hv_xhci_debug_remove_wrapper,
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/*
* tegra-hv-xhci: Tegra Hypervisor XHCI Driver
@@ -12,6 +12,8 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include <nvidia/conftest.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -252,9 +254,21 @@ static const struct of_device_id tegra_hv_xhci_match[] = {
MODULE_DEVICE_TABLE(of, tegra_hv_xhci_match);
#endif /* CONFIG_OF */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_xhci_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_xhci_remove(pdev);
}
#else
static inline int tegra_hv_xhci_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_xhci_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_xhci_platform_driver = {
.probe = tegra_hv_xhci_probe,
.remove = tegra_hv_xhci_remove,
.remove = tegra_hv_xhci_remove_wrapper,
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,

View File

@@ -1,10 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
/*
* Tegra Ultrasonics Sensor Subsystem IO-Proxy driver
*
* Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <linux/interrupt.h>
@@ -496,9 +498,21 @@ static int tegra_uss_io_proxy_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_uss_io_proxy_remove_wrapper(struct platform_device *pdev)
{
tegra_uss_io_proxy_remove(pdev);
}
#else
static inline int tegra_uss_io_proxy_remove_wrapper(struct platform_device *pdev)
{
return tegra_uss_io_proxy_remove(pdev);
}
#endif
static struct platform_driver tegra_uss_io_proxy_driver = {
.probe = tegra_uss_io_proxy_probe,
.remove = tegra_uss_io_proxy_remove,
.remove = tegra_uss_io_proxy_remove_wrapper,
.driver = {
.name = "tegra-uss-io-proxy",
.owner = THIS_MODULE,

View File

@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -756,9 +758,21 @@ static const struct of_device_id tegra_bl_debug_of_match[] = {
MODULE_DEVICE_TABLE(of, tegra_bl_debug_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_bl_debug_remove_wrapper(struct platform_device *pdev)
{
tegra_bl_debug_remove(pdev);
}
#else
static inline int tegra_bl_debug_remove_wrapper(struct platform_device *pdev)
{
return tegra_bl_debug_remove(pdev);
}
#endif
static struct platform_driver tegra_bl_debug_driver = {
.probe = tegra_bl_debug_probe,
.remove = tegra_bl_debug_remove,
.remove = tegra_bl_debug_remove_wrapper,
.driver = {
.name = "tegra_bl_debug",
.pm = &profiler_pm_ops,

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/of.h>
#include <linux/platform_device.h>
@@ -621,13 +623,25 @@ static const struct of_device_id scf_pmu_of_device_ids[] = {
};
MODULE_DEVICE_TABLE(of, scf_pmu_of_device_ids);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void scf_pmu_device_remove_wrapper(struct platform_device *pdev)
{
scf_pmu_device_remove(pdev);
}
#else
static inline int scf_pmu_device_remove_wrapper(struct platform_device *pdev)
{
return scf_pmu_device_remove(pdev);
}
#endif
static struct platform_driver scf_pmu_driver = {
.driver = {
.name = "scf-pmu-drv",
.of_match_table = scf_pmu_of_device_ids,
},
.probe = scf_pmu_device_probe,
.remove = scf_pmu_device_remove,
.remove = scf_pmu_device_remove_wrapper,
};
static int __init register_pmu_driver(void)

View File

@@ -566,6 +566,18 @@ static const struct of_device_id pwm_tegra_tach_of_match[] = {
};
MODULE_DEVICE_TABLE(of, pwm_tegra_tach_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void pwm_tegra_tach_remove_wrapper(struct platform_device *pdev)
{
pwm_tegra_tach_remove(pdev);
}
#else
static inline int pwm_tegra_tach_remove_wrapper(struct platform_device *pdev)
{
return pwm_tegra_tach_remove(pdev);
}
#endif
static struct platform_driver tegra_tach_driver = {
.driver = {
.name = "pwm-tegra-tachometer",
@@ -573,7 +585,7 @@ static struct platform_driver tegra_tach_driver = {
.pm = &pwm_tegra_tach_pm_ops,
},
.probe = pwm_tegra_tach_probe,
.remove = pwm_tegra_tach_remove,
.remove = pwm_tegra_tach_remove_wrapper,
};
module_platform_driver(tegra_tach_driver);

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/module.h>
#include <linux/interrupt.h>
@@ -489,9 +491,21 @@ static int ras_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void ras_remove_wrapper(struct platform_device *pdev)
{
ras_remove(pdev);
}
#else
static inline int ras_remove_wrapper(struct platform_device *pdev)
{
return ras_remove(pdev);
}
#endif
static struct platform_driver ras_driver = {
.probe = ras_probe,
.remove = ras_remove,
.remove = ras_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "arm64_ras",

View File

@@ -2,9 +2,11 @@
/*
* RTC driver for NVIDIA Voltage Regulator Power Sequencer
*
* Copyright (C) 2022-2023 NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/slab.h>
@@ -520,13 +522,25 @@ static const struct platform_device_id nvvrs_rtc_id[] = {
};
MODULE_DEVICE_TABLE(platform, nvvrs_rtc_id);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvvrs_rtc_remove_wrapper(struct platform_device *pdev)
{
nvvrs_rtc_remove(pdev);
}
#else
static inline int nvvrs_rtc_remove_wrapper(struct platform_device *pdev)
{
return nvvrs_rtc_remove(pdev);
}
#endif
static struct platform_driver nvvrs_rtc_driver = {
.driver = {
.name = "nvvrs-pseq-rtc",
.pm = &nvvrs_rtc_pm_ops,
},
.probe = nvvrs_rtc_probe,
.remove = nvvrs_rtc_remove,
.remove = nvvrs_rtc_remove_wrapper,
.shutdown = nvvrs_rtc_shutdown,
.id_table = nvvrs_rtc_id,
};

View File

@@ -1,9 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/*
* RTC driver for Maxim MAX77851
*/
#include <nvidia/conftest.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/rtc.h>
@@ -874,6 +876,18 @@ static const struct platform_device_id rtc_id[] = {
};
MODULE_DEVICE_TABLE(platform, rtc_id);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void max77851_rtc_remove_wrapper(struct platform_device *pdev)
{
max77851_rtc_remove(pdev);
}
#else
static inline int max77851_rtc_remove_wrapper(struct platform_device *pdev)
{
return max77851_rtc_remove(pdev);
}
#endif
static struct platform_driver max77851_rtc_driver = {
.driver = {
.name = "max77851-rtc",
@@ -881,7 +895,7 @@ static struct platform_driver max77851_rtc_driver = {
},
.probe = max77851_rtc_probe,
.shutdown = max77851_rtc_shutdown,
.remove = max77851_rtc_remove,
.remove = max77851_rtc_remove_wrapper,
.id_table = rtc_id,
};

View File

@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
// SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
@@ -2213,9 +2211,21 @@ static const struct dev_pm_ops ufs_tegra_pm_ops = {
SET_RUNTIME_PM_OPS(ufshcd_runtime_suspend, ufshcd_runtime_resume, NULL)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void ufs_tegra_remove_wrapper(struct platform_device *pdev)
{
ufs_tegra_remove(pdev);
}
#else
static inline int ufs_tegra_remove_wrapper(struct platform_device *pdev)
{
return ufs_tegra_remove(pdev);
}
#endif
static struct platform_driver ufs_tegra_platform = {
.probe = ufs_tegra_probe,
.remove = ufs_tegra_remove,
.remove = ufs_tegra_remove_wrapper,
.driver = {
.name = "ufs_tegra",
.pm = &ufs_tegra_pm_ops,

View File

@@ -1,10 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2022-2024 NVIDIA CORPORATION. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION. All rights reserved.
/* The kfuse block stores downstream and upstream HDCP keys for use by HDMI
* module.
*/
#include <nvidia/conftest.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/io.h>
@@ -304,9 +306,21 @@ static const struct of_device_id tegra_kfuse_of_match[] = {
{ },
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_kfuse_remove_wrapper(struct platform_device *pdev)
{
tegra_kfuse_remove(pdev);
}
#else
static inline int tegra_kfuse_remove_wrapper(struct platform_device *pdev)
{
return tegra_kfuse_remove(pdev);
}
#endif
static struct platform_driver kfuse_driver = {
.probe = tegra_kfuse_probe,
.remove = tegra_kfuse_remove,
.remove = tegra_kfuse_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "kfuse",

View File

@@ -2274,6 +2274,18 @@ static const struct dev_pm_ops tegra_spi_pm_ops = {
tegra_spi_runtime_resume, NULL)
SET_SYSTEM_SLEEP_PM_OPS(tegra_spi_suspend, tegra_spi_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_spi_remove_wrapper(struct platform_device *pdev)
{
tegra_spi_remove(pdev);
}
#else
static inline int tegra_spi_remove_wrapper(struct platform_device *pdev)
{
return tegra_spi_remove(pdev);
}
#endif
static struct platform_driver tegra_spi_driver = {
.driver = {
.name = "spi-tegra124-slave",
@@ -2282,7 +2294,7 @@ static struct platform_driver tegra_spi_driver = {
.of_match_table = of_match_ptr(tegra_spi_of_match),
},
.probe = tegra_spi_probe,
.remove = tegra_spi_remove,
.remove = tegra_spi_remove_wrapper,
};
module_platform_driver(tegra_spi_driver);

View File

@@ -1924,6 +1924,18 @@ static const struct dev_pm_ops tegra_qspi_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(tegra_qspi_suspend, tegra_qspi_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_qspi_remove_wrapper(struct platform_device *pdev)
{
tegra_qspi_remove(pdev);
}
#else
static inline int tegra_qspi_remove_wrapper(struct platform_device *pdev)
{
return tegra_qspi_remove(pdev);
}
#endif
static struct platform_driver tegra_qspi_driver = {
.driver = {
.name = "tegra-qspi",
@@ -1932,7 +1944,7 @@ static struct platform_driver tegra_qspi_driver = {
.acpi_match_table = ACPI_PTR(tegra_qspi_acpi_match),
},
.probe = tegra_qspi_probe,
.remove = tegra_qspi_remove,
.remove = tegra_qspi_remove_wrapper,
};
module_platform_driver(tegra_qspi_driver);

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <dt-bindings/thermal/tegra234-soctherm.h>
#include <linux/err.h>
@@ -207,9 +209,21 @@ static int tegra234_oc_event_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra234_oc_event_remove_wrapper(struct platform_device *pdev)
{
tegra234_oc_event_remove(pdev);
}
#else
static inline int tegra234_oc_event_remove_wrapper(struct platform_device *pdev)
{
return tegra234_oc_event_remove(pdev);
}
#endif
static struct platform_driver tegra234_oc_event_driver = {
.probe = tegra234_oc_event_probe,
.remove = tegra234_oc_event_remove,
.remove = tegra234_oc_event_remove_wrapper,
.driver = {
.name = "tegra234-oc-event",
.of_match_table = of_tegra234_oc_event_match,

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -239,6 +241,18 @@ static const struct of_device_id thermal_trip_event_of_match[] = {
};
MODULE_DEVICE_TABLE(of, thermal_trip_event_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void thermal_trip_event_remove_wrapper(struct platform_device *pdev)
{
thermal_trip_event_remove(pdev);
}
#else
static inline int thermal_trip_event_remove_wrapper(struct platform_device *pdev)
{
return thermal_trip_event_remove(pdev);
}
#endif
static struct platform_driver thermal_trip_event_driver = {
.driver = {
.name = "thermal-trip-event",
@@ -246,7 +260,7 @@ static struct platform_driver thermal_trip_event_driver = {
.of_match_table = thermal_trip_event_of_match,
},
.probe = thermal_trip_event_probe,
.remove = thermal_trip_event_remove,
.remove = thermal_trip_event_remove_wrapper,
};
module_platform_driver(thermal_trip_event_driver);

View File

@@ -1,8 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0-only
/*
* SPDX-FileCopyrightText: Copyright (C) 2015-2023 NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/fs.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
@@ -796,9 +798,21 @@ static int tegra_camera_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_camera_remove_wrapper(struct platform_device *pdev)
{
tegra_camera_remove(pdev);
}
#else
static inline int tegra_camera_remove_wrapper(struct platform_device *pdev)
{
return tegra_camera_remove(pdev);
}
#endif
static struct platform_driver tegra_camera_driver = {
.probe = tegra_camera_probe,
.remove = tegra_camera_remove,
.remove = tegra_camera_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "tegra_camera_platform",

View File

@@ -2,10 +2,13 @@
/*
* Capture support for syncpoint and GoS management
*
* Copyright (c) 2017-2024, NVIDIA Corporation. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2017-2024, NVIDIA Corporation. All rights reserved.
*/
#include <nvidia/conftest.h>
#include "capture-support.h"
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/export.h>
@@ -199,9 +202,21 @@ static const struct of_device_id capture_support_match[] = {
};
MODULE_DEVICE_TABLE(of, capture_support_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void capture_support_remove_wrapper(struct platform_device *pdev)
{
capture_support_remove(pdev);
}
#else
static inline int capture_support_remove_wrapper(struct platform_device *pdev)
{
return capture_support_remove(pdev);
}
#endif
static struct platform_driver capture_support_driver = {
.probe = capture_support_probe,
.remove = capture_support_remove,
.remove = capture_support_remove_wrapper,
.driver = {
/* Only suitable name for dummy falcon driver */
.name = "scare-pigeon",

View File

@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <asm/ioctls.h>
#include <linux/clk.h>
#include <linux/debugfs.h>
@@ -379,9 +381,21 @@ static const struct of_device_id tegra_isp5_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_isp5_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void isp5_remove_wrapper(struct platform_device *pdev)
{
isp5_remove(pdev);
}
#else
static inline int isp5_remove_wrapper(struct platform_device *pdev)
{
return isp5_remove(pdev);
}
#endif
static struct platform_driver isp5_driver = {
.probe = isp5_probe,
.remove = isp5_remove,
.remove = isp5_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "tegra194-isp5",

View File

@@ -1,9 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* SPDX-FileCopyrightText: Copyright (C) 2017-2023 NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include "nvcsi-t194.h"
#include <uapi/linux/nvhost_nvcsi_ioctl.h>
#include <linux/tegra-camera-rtcpu.h>
@@ -243,9 +246,21 @@ static int __exit t194_nvcsi_remove(struct platform_device *dev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void t194_nvcsi_remove_wrapper(struct platform_device *pdev)
{
t194_nvcsi_remove(pdev);
}
#else
static inline int t194_nvcsi_remove_wrapper(struct platform_device *pdev)
{
return t194_nvcsi_remove(pdev);
}
#endif
static struct platform_driver t194_nvcsi_driver = {
.probe = t194_nvcsi_probe,
.remove = __exit_p(t194_nvcsi_remove),
.remove = __exit_p(t194_nvcsi_remove_wrapper),
.driver = {
.owner = THIS_MODULE,
.name = "t194-nvcsi",

View File

@@ -4,6 +4,8 @@
* NVDLA driver for T194/T23x
*/
#include <nvidia/conftest.h>
#include <linux/arm64-barrier.h>
#include <linux/module.h>
#include <linux/fs.h>
@@ -1524,9 +1526,21 @@ const struct dev_pm_ops nvdla_module_pm_ops = {
};
#endif /* CONFIG_PM */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void __exit nvdla_remove_wrapper(struct platform_device *pdev)
{
nvdla_remove(pdev);
}
#else
static inline int __exit nvdla_remove_wrapper(struct platform_device *pdev)
{
return nvdla_remove(pdev);
}
#endif
static struct platform_driver nvdla_driver = {
.probe = nvdla_probe,
.remove = __exit_p(nvdla_remove),
.remove = __exit_p(nvdla_remove_wrapper),
.driver = {
.owner = THIS_MODULE,
.name = "nvdla",

View File

@@ -1,9 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2016-2024, NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2016-2024, NVIDIA CORPORATION. All rights reserved.
*/
#include <nvidia/conftest.h>
#include "pva_mailbox.h"
#include <linux/workqueue.h>
#include "nvpva_client.h"
#include <linux/export.h>
@@ -1721,9 +1724,21 @@ const struct dev_pm_ops nvpva_module_pm_ops = {
};
#endif /* CONFIG_PM */
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void __exit pva_remove_wrapper(struct platform_device *pdev)
{
pva_remove(pdev);
}
#else
static inline int __exit pva_remove_wrapper(struct platform_device *pdev)
{
return pva_remove(pdev);
}
#endif
static struct platform_driver pva_driver = {
.probe = pva_probe,
.remove = __exit_p(pva_remove),
.remove = __exit_p(pva_remove_wrapper),
.driver = {
.owner = THIS_MODULE,
.name = "pva",

View File

@@ -1,10 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* PVA Application Specific Virtual Memory
*/
#include <nvidia/conftest.h>
#include <linux/dma-mapping.h>
#include <linux/of_platform.h>
#include <linux/of_device.h>
@@ -288,9 +290,21 @@ static int __exit pva_iommu_context_dev_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void __exit pva_iommu_context_dev_remove_wrapper(struct platform_device *pdev)
{
pva_iommu_context_dev_remove(pdev);
}
#else
static inline int __exit pva_iommu_context_dev_remove_wrapper(struct platform_device *pdev)
{
return pva_iommu_context_dev_remove(pdev);
}
#endif
struct platform_driver nvpva_iommu_context_dev_driver = {
.probe = pva_iommu_context_dev_probe,
.remove = __exit_p(pva_iommu_context_dev_remove),
.remove = __exit_p(pva_iommu_context_dev_remove_wrapper),
.driver = {
.owner = THIS_MODULE,
.name = "pva_iommu_context_dev",

View File

@@ -4,6 +4,8 @@
* VI5 driver
*/
#include <nvidia/conftest.h>
#include <asm/ioctls.h>
#include <linux/debugfs.h>
#include <linux/device.h>
@@ -416,9 +418,21 @@ const struct dev_pm_ops vi_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void vi5_remove_wrapper(struct platform_device *pdev)
{
vi5_remove(pdev);
}
#else
static inline int vi5_remove_wrapper(struct platform_device *pdev)
{
return vi5_remove(pdev);
}
#endif
static struct platform_driver vi5_driver = {
.probe = vi5_probe,
.remove = vi5_remove,
.remove = vi5_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "tegra194-vi5",

View File

@@ -1,10 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2014-2024, NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2014-2024, NVIDIA CORPORATION. All rights reserved.
*/
#define pr_fmt(fmt) "%s: " fmt, __func__
#include <nvidia/conftest.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
@@ -785,9 +787,21 @@ static bool nvmap_is_carveout_node_present(void)
return false;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void nvmap_remove_wrapper(struct platform_device *pdev)
{
nvmap_remove(pdev);
}
#else
static inline int nvmap_remove_wrapper(struct platform_device *pdev)
{
return nvmap_remove(pdev);
}
#endif
static struct platform_driver __refdata nvmap_driver = {
.probe = nvmap_probe,
.remove = nvmap_remove,
.remove = nvmap_remove_wrapper,
.driver = {
.name = "tegra-carveouts",

View File

@@ -5,6 +5,8 @@
* Tegra TSEC Module Support
*/
#include <nvidia/conftest.h>
#include "tsec_linux.h"
#include "tsec.h"
#include "tsec_boot.h"
@@ -457,9 +459,21 @@ static int tsec_remove(struct platform_device *dev)
return tsec_poweroff(&dev->dev);
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tsec_remove_wrapper(struct platform_device *pdev)
{
tsec_remove(pdev);
}
#else
static inline int tsec_remove_wrapper(struct platform_device *pdev)
{
return tsec_remove(pdev);
}
#endif
static struct platform_driver tsec_driver = {
.probe = tsec_probe,
.remove = tsec_remove,
.remove = tsec_remove_wrapper,
.driver = {
.owner = THIS_MODULE,
.name = "tsec",

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -1036,6 +1036,18 @@ static const struct of_device_id tegra_hv_match[] = {
{},
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_remove(pdev);
}
#else
static inline int tegra_hv_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_driver = {
.driver = {
.name = DRV_NAME,
@@ -1043,7 +1055,7 @@ static struct platform_driver tegra_hv_driver = {
.of_match_table = of_match_ptr(tegra_hv_match),
},
.probe = tegra_hv_probe,
.remove = tegra_hv_remove,
.remove = tegra_hv_remove_wrapper,
};
static int __init tegra_hv_init(void)

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -1144,6 +1144,18 @@ static const struct of_device_id tegra_hv_pm_ctl_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_hv_pm_ctl_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_pm_ctl_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_pm_ctl_remove(pdev);
}
#else
static inline int tegra_hv_pm_ctl_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_pm_ctl_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_pm_ctl_driver = {
.driver = {
.name = DRV_NAME,
@@ -1151,7 +1163,7 @@ static struct platform_driver tegra_hv_pm_ctl_driver = {
.of_match_table = of_match_ptr(tegra_hv_pm_ctl_match),
},
.probe = tegra_hv_pm_ctl_probe,
.remove = tegra_hv_pm_ctl_remove,
.remove = tegra_hv_pm_ctl_remove_wrapper,
};
module_platform_driver(tegra_hv_pm_ctl_driver);

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#define pr_fmt(fmt) "%s:%s(): " fmt, KBUILD_MODNAME, __func__
@@ -458,6 +458,18 @@ static const struct of_device_id tegra_hv_vcpu_yield_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_hv_vcpu_yield_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_hv_vcpu_yield_remove_wrapper(struct platform_device *pdev)
{
tegra_hv_vcpu_yield_remove(pdev);
}
#else
static inline int tegra_hv_vcpu_yield_remove_wrapper(struct platform_device *pdev)
{
return tegra_hv_vcpu_yield_remove(pdev);
}
#endif
static struct platform_driver tegra_hv_vcpu_yield_driver = {
.driver = {
.name = DRV_NAME,
@@ -465,7 +477,7 @@ static struct platform_driver tegra_hv_vcpu_yield_driver = {
.of_match_table = of_match_ptr(tegra_hv_vcpu_yield_match),
},
.probe = tegra_hv_vcpu_yield_probe,
.remove = tegra_hv_vcpu_yield_remove,
.remove = tegra_hv_vcpu_yield_remove_wrapper,
};
module_platform_driver(tegra_hv_vcpu_yield_driver);

View File

@@ -1,9 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
/*
* Maxim MAX77851 Watchdog Driver
*/
#include <nvidia/conftest.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@ -208,12 +210,24 @@ static struct platform_device_id max77851_wdt_devtype[] = {
{ },
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void max77851_wdt_remove_wrapper(struct platform_device *pdev)
{
max77851_wdt_remove(pdev);
}
#else
static inline int max77851_wdt_remove_wrapper(struct platform_device *pdev)
{
return max77851_wdt_remove(pdev);
}
#endif
static struct platform_driver max77851_wdt_driver = {
.driver = {
.name = "max77851-watchdog",
},
.probe = max77851_wdt_probe,
.remove = max77851_wdt_remove,
.remove = max77851_wdt_remove_wrapper,
.id_table = max77851_wdt_devtype,
};

View File

@@ -2,9 +2,11 @@
/*
* A platform based Software Watchdog Device
*
* Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2014-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/timer.h>
@@ -240,6 +242,18 @@ static struct of_device_id softdog_platform_of_match[] = {
};
MODULE_DEVICE_TABLE(of, softdog_platform_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void softdog_platform_remove_wrapper(struct platform_device *pdev)
{
softdog_platform_remove(pdev);
}
#else
static inline int softdog_platform_remove_wrapper(struct platform_device *pdev)
{
return softdog_platform_remove(pdev);
}
#endif
static struct platform_driver softdog_platform_driver = {
.driver = {
.name = "softdog-platform",
@@ -248,7 +262,7 @@ static struct platform_driver softdog_platform_driver = {
.pm = &softdog_platform_pm_ops,
},
.probe = softdog_platform_probe,
.remove = softdog_platform_remove,
.remove = softdog_platform_remove_wrapper,
.shutdown = softdog_platform_shutdown,
};

View File

@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2023 NVIDIA CORPORATION. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <nvidia/conftest.h>
#include <linux/debugfs.h>
#include <linux/fs.h>
@@ -828,9 +830,21 @@ static const struct of_device_id tegra_wdt_t18x_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_wdt_t18x_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_wdt_t18x_remove_wrapper(struct platform_device *pdev)
{
tegra_wdt_t18x_remove(pdev);
}
#else
static inline int tegra_wdt_t18x_remove_wrapper(struct platform_device *pdev)
{
return tegra_wdt_t18x_remove(pdev);
}
#endif
static struct platform_driver tegra_wdt_t18x_driver = {
.probe = tegra_wdt_t18x_probe,
.remove = tegra_wdt_t18x_remove,
.remove = tegra_wdt_t18x_remove_wrapper,
.shutdown = tegra_wdt_t18x_shutdown,
.driver = {
.owner = THIS_MODULE,

View File

@@ -5370,6 +5370,18 @@ static const struct dev_pm_ops tegra210_adsp_pm_ops = {
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra210_adsp_audio_remove_wrapper(struct platform_device *pdev)
{
tegra210_adsp_audio_remove(pdev);
}
#else
static inline int tegra210_adsp_audio_remove_wrapper(struct platform_device *pdev)
{
return tegra210_adsp_audio_remove(pdev);
}
#endif
static struct platform_driver tegra210_adsp_audio_driver = {
.driver = {
.name = DRV_NAME_ADSP,
@@ -5380,7 +5392,7 @@ static struct platform_driver tegra210_adsp_audio_driver = {
},
.probe = tegra210_adsp_audio_probe,
.shutdown = tegra210_adsp_audio_shutdown,
.remove = tegra210_adsp_audio_remove,
.remove = tegra210_adsp_audio_remove_wrapper,
};
module_platform_driver(tegra210_adsp_audio_driver);

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <nvidia/conftest.h>
@@ -251,6 +251,18 @@ static int tegra_virt_machine_driver_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_virt_machine_driver_remove_wrapper(struct platform_device *pdev)
{
tegra_virt_machine_driver_remove(pdev);
}
#else
static inline int tegra_virt_machine_driver_remove_wrapper(struct platform_device *pdev)
{
return tegra_virt_machine_driver_remove(pdev);
}
#endif
static struct platform_driver tegra_virt_machine_driver = {
.driver = {
.name = DRV_NAME,
@@ -260,7 +272,7 @@ static struct platform_driver tegra_virt_machine_driver = {
of_match_ptr(tegra_virt_machine_of_match),
},
.probe = tegra_virt_machine_driver_probe,
.remove = tegra_virt_machine_driver_remove,
.remove = tegra_virt_machine_driver_remove_wrapper,
};
module_platform_driver(tegra_virt_machine_driver);

View File

@@ -799,6 +799,18 @@ static const struct dev_pm_ops tegra186_arad_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra186_arad_platform_remove_wrapper(struct platform_device *pdev)
{
tegra186_arad_platform_remove(pdev);
}
#else
static inline int tegra186_arad_platform_remove_wrapper(struct platform_device *pdev)
{
return tegra186_arad_platform_remove(pdev);
}
#endif
static struct platform_driver tegra186_arad_driver = {
.driver = {
.name = "tegra186-arad",
@@ -806,7 +818,7 @@ static struct platform_driver tegra186_arad_driver = {
.pm = &tegra186_arad_pm_ops,
},
.probe = tegra186_arad_platform_probe,
.remove = tegra186_arad_platform_remove,
.remove = tegra186_arad_platform_remove_wrapper,
};
module_platform_driver(tegra186_arad_driver)

View File

@@ -3,6 +3,8 @@
//
// tegra210_adsp.c - Tegra ADSP audio driver
#include <nvidia/conftest.h>
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/device.h>
@@ -4815,6 +4817,18 @@ static const struct dev_pm_ops tegra210_adsp_pm_ops = {
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra210_adsp_audio_remove_wrapper(struct platform_device *pdev)
{
tegra210_adsp_audio_remove(pdev);
}
#else
static inline int tegra210_adsp_audio_remove_wrapper(struct platform_device *pdev)
{
return tegra210_adsp_audio_remove(pdev);
}
#endif
static struct platform_driver tegra210_adsp_audio_driver = {
.driver = {
.name = DRV_NAME,
@@ -4824,7 +4838,7 @@ static struct platform_driver tegra210_adsp_audio_driver = {
.suppress_bind_attrs = true,
},
.probe = tegra210_adsp_audio_probe,
.remove = tegra210_adsp_audio_remove,
.remove = tegra210_adsp_audio_remove_wrapper,
.shutdown = tegra210_adsp_audio_platform_shutdown,
};
module_platform_driver(tegra210_adsp_audio_driver);

View File

@@ -560,6 +560,18 @@ static const struct dev_pm_ops tegra210_afc_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra210_afc_platform_remove_wrapper(struct platform_device *pdev)
{
tegra210_afc_platform_remove(pdev);
}
#else
static inline int tegra210_afc_platform_remove_wrapper(struct platform_device *pdev)
{
return tegra210_afc_platform_remove(pdev);
}
#endif
static struct platform_driver tegra210_afc_driver = {
.driver = {
.name = "tegra210-afc",
@@ -567,7 +579,7 @@ static struct platform_driver tegra210_afc_driver = {
.pm = &tegra210_afc_pm_ops,
},
.probe = tegra210_afc_platform_probe,
.remove = tegra210_afc_platform_remove,
.remove = tegra210_afc_platform_remove_wrapper,
};
module_platform_driver(tegra210_afc_driver)

View File

@@ -3,6 +3,8 @@
//
// tegra210_iqc.c - Tegra210 IQC driver
#include <nvidia/conftest.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/io.h>
@@ -344,6 +346,18 @@ static const struct dev_pm_ops tegra210_iqc_pm_ops = {
pm_runtime_force_resume)
};
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra210_iqc_platform_remove_wrapper(struct platform_device *pdev)
{
tegra210_iqc_platform_remove(pdev);
}
#else
static inline int tegra210_iqc_platform_remove_wrapper(struct platform_device *pdev)
{
return tegra210_iqc_platform_remove(pdev);
}
#endif
static struct platform_driver tegra210_iqc_driver = {
.driver = {
.name = "tegra210-iqc",
@@ -351,7 +365,7 @@ static struct platform_driver tegra210_iqc_driver = {
.pm = &tegra210_iqc_pm_ops,
},
.probe = tegra210_iqc_platform_probe,
.remove = tegra210_iqc_platform_remove,
.remove = tegra210_iqc_platform_remove_wrapper,
};
module_platform_driver(tegra210_iqc_driver)

View File

@@ -502,6 +502,18 @@ static const struct of_device_id tegra_mixer_control_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_mixer_control_of_match);
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void tegra_mixer_control_remove_wrapper(struct platform_device *pdev)
{
tegra_mixer_control_remove(pdev);
}
#else
static inline int tegra_mixer_control_remove_wrapper(struct platform_device *pdev)
{
return tegra_mixer_control_remove(pdev);
}
#endif
static struct platform_driver tegra_mixer_control_driver = {
.driver = {
.name = "tegra-mixer-controls",
@@ -509,7 +521,7 @@ static struct platform_driver tegra_mixer_control_driver = {
.pm = &tegra_mixer_control_pm_ops,
},
.probe = tegra_mixer_control_probe,
.remove = tegra_mixer_control_remove,
.remove = tegra_mixer_control_remove_wrapper,
};
module_platform_driver(tegra_mixer_control_driver);

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#define pr_fmt(msg) "Safety I2S: " msg
@@ -817,9 +817,21 @@ static int t234_safety_audio_remove(struct platform_device *pdev)
return 0;
}
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
static inline void t234_safety_audio_remove_wrapper(struct platform_device *pdev)
{
t234_safety_audio_remove(pdev);
}
#else
static inline int t234_safety_audio_remove_wrapper(struct platform_device *pdev)
{
return t234_safety_audio_remove(pdev);
}
#endif
static struct platform_driver t234_safety_audio_driver = {
.probe = t234_safety_audio_probe,
.remove = t234_safety_audio_remove,
.remove = t234_safety_audio_remove_wrapper,
.driver = {
.name = "tegra234-safety-audio",
.owner = THIS_MODULE,