diff --git a/drivers/block/tegra_oops_virt_storage/tegra_hv_vblk_oops.c b/drivers/block/tegra_oops_virt_storage/tegra_hv_vblk_oops.c index 80b212af..2d84c6b2 100644 --- a/drivers/block/tegra_oops_virt_storage/tegra_hv_vblk_oops.c +++ b/drivers/block/tegra_oops_virt_storage/tegra_hv_vblk_oops.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/block/tegra_virt_storage/tegra_hv_vblk.c b/drivers/block/tegra_virt_storage/tegra_hv_vblk.c index 6c82ceaa..3423887b 100644 --- a/drivers/block/tegra_virt_storage/tegra_hv_vblk.c +++ b/drivers/block/tegra_virt_storage/tegra_hv_vblk.c @@ -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, diff --git a/drivers/bus/tegra-aocluster.c b/drivers/bus/tegra-aocluster.c index 866daaca..9c57e54c 100644 --- a/drivers/bus/tegra-aocluster.c +++ b/drivers/bus/tegra-aocluster.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/cpuidle/cpuidle-tegra-auto.c b/drivers/cpuidle/cpuidle-tegra-auto.c index 542c6d09..8d24dfe0 100644 --- a/drivers/cpuidle/cpuidle-tegra-auto.c +++ b/drivers/cpuidle/cpuidle-tegra-auto.c @@ -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 #include #include @@ -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", diff --git a/drivers/crypto/tegra-hv-vse-safety.c b/drivers/crypto/tegra-hv-vse-safety.c index e672c1cb..72fe3c77 100644 --- a/drivers/crypto/tegra-hv-vse-safety.c +++ b/drivers/crypto/tegra-hv-vse-safety.c @@ -6,6 +6,8 @@ * Cryptographic API. */ +#include + #include #include #include @@ -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", diff --git a/drivers/crypto/tegra-se-nvrng.c b/drivers/crypto/tegra-se-nvrng.c index cf5f2508..15b34348 100644 --- a/drivers/crypto/tegra-se-nvrng.c +++ b/drivers/crypto/tegra-se-nvrng.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/crypto/tegra/tegra-se-main.c b/drivers/crypto/tegra/tegra-se-main.c index c39dd66e..b7182542 100644 --- a/drivers/crypto/tegra/tegra-se-main.c +++ b/drivers/crypto/tegra/tegra-se-main.c @@ -4,6 +4,8 @@ * Crypto driver for NVIDIA Security Engine in Tegra Chips */ +#include + #include #include #include @@ -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) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 4d10dfe4..dd00dab8 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -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 @@ -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, }; diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c index fb45477e..7b49cdde 100644 --- a/drivers/gpu/drm/tegra/dpaux.c +++ b/drivers/gpu/drm/tegra/dpaux.c @@ -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 @@ -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) diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 1e4f0920..e836ca59 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -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 @@ -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, }; diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c index a5131eaf..517588fd 100644 --- a/drivers/gpu/drm/tegra/gr2d.c +++ b/drivers/gpu/drm/tegra/gr2d.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c index d55158b3..6b5e6b7e 100644 --- a/drivers/gpu/drm/tegra/gr3d.c +++ b/drivers/gpu/drm/tegra/gr3d.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 71362ecc..df27bc86 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -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 @@ -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, }; diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c index 9ba941a4..f1cc761b 100644 --- a/drivers/gpu/drm/tegra/hub.c +++ b/drivers/gpu/drm/tegra/hub.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/gpu/drm/tegra/nvdec.c b/drivers/gpu/drm/tegra/nvdec.c index 15cd9e06..0369099a 100644 --- a/drivers/gpu/drm/tegra/nvdec.c +++ b/drivers/gpu/drm/tegra/nvdec.c @@ -3,6 +3,8 @@ * SPDX-FileCopyrightText: Copyright (c) 2015-2024, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved. */ +#include + #include #include #include @@ -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) diff --git a/drivers/gpu/drm/tegra/nvenc.c b/drivers/gpu/drm/tegra/nvenc.c index 5f6cead8..85679561 100644 --- a/drivers/gpu/drm/tegra/nvenc.c +++ b/drivers/gpu/drm/tegra/nvenc.c @@ -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) diff --git a/drivers/gpu/drm/tegra/nvjpg.c b/drivers/gpu/drm/tegra/nvjpg.c index 96394e55..e6560dee 100644 --- a/drivers/gpu/drm/tegra/nvjpg.c +++ b/drivers/gpu/drm/tegra/nvjpg.c @@ -3,6 +3,8 @@ * SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved. */ +#include + #include #include #include @@ -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) diff --git a/drivers/gpu/drm/tegra/ofa.c b/drivers/gpu/drm/tegra/ofa.c index 23758f97..4f7a1d86 100644 --- a/drivers/gpu/drm/tegra/ofa.c +++ b/drivers/gpu/drm/tegra/ofa.c @@ -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 @@ -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) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 9947d44d..90a6c6ec 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -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 @@ -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, }; diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index b6684373..3c8a5f1a 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -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) diff --git a/drivers/gpu/drm/tegra/virt.c b/drivers/gpu/drm/tegra/virt.c index e7b00fc6..f10bceee 100644 --- a/drivers/gpu/drm/tegra/virt.c +++ b/drivers/gpu/drm/tegra/virt.c @@ -3,6 +3,8 @@ * Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ +#include + #include #include #include @@ -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, }; diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index 8919d73e..3d413046 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -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 @@ -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[] = { diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c index 614733c2..d22cabf5 100644 --- a/drivers/gpu/host1x/mipi.c +++ b/drivers/gpu/host1x/mipi.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/i2c/busses/i2c-tegra-slave-byte.c b/drivers/i2c/busses/i2c-tegra-slave-byte.c index 3cf50d80..88dd2b03 100644 --- a/drivers/i2c/busses/i2c-tegra-slave-byte.c +++ b/drivers/i2c/busses/i2c-tegra-slave-byte.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only // SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +#include + #include #include #include @@ -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, diff --git a/drivers/media/platform/tegra/cam_fsync/cam_fsync.c b/drivers/media/platform/tegra/cam_fsync/cam_fsync.c index 2fca2a1f..2e930825 100644 --- a/drivers/media/platform/tegra/cam_fsync/cam_fsync.c +++ b/drivers/media/platform/tegra/cam_fsync/cam_fsync.c @@ -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); diff --git a/drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c b/drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c index 319e5a0d..963968b4 100644 --- a/drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c +++ b/drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c @@ -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", diff --git a/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c b/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c index 57b892f1..509e9001 100644 --- a/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c +++ b/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c @@ -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 + #include #include #include @@ -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", diff --git a/drivers/media/platform/tegra/cdi/cam_cdi_tsc.c b/drivers/media/platform/tegra/cdi/cam_cdi_tsc.c index 97ff218e..fa0ded5c 100644 --- a/drivers/media/platform/tegra/cdi/cam_cdi_tsc.c +++ b/drivers/media/platform/tegra/cdi/cam_cdi_tsc.c @@ -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); diff --git a/drivers/media/platform/tegra/cdi/cdi_gpio.c b/drivers/media/platform/tegra/cdi/cdi_gpio.c index 6f3959ea..34775ddc 100644 --- a/drivers/media/platform/tegra/cdi/cdi_gpio.c +++ b/drivers/media/platform/tegra/cdi/cdi_gpio.c @@ -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, diff --git a/drivers/media/platform/tegra/cdi/cdi_mgr.c b/drivers/media/platform/tegra/cdi/cdi_mgr.c index 451b63e0..3262ec82 100644 --- a/drivers/media/platform/tegra/cdi/cdi_mgr.c +++ b/drivers/media/platform/tegra/cdi/cdi_mgr.c @@ -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 @@ -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); diff --git a/drivers/media/platform/tegra/cdi/cdi_pwm.c b/drivers/media/platform/tegra/cdi/cdi_pwm.c index bf23b9d4..83a4bd02 100644 --- a/drivers/media/platform/tegra/cdi/cdi_pwm.c +++ b/drivers/media/platform/tegra/cdi/cdi_pwm.c @@ -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); diff --git a/drivers/media/platform/tegra/isc/isc_gpio.c b/drivers/media/platform/tegra/isc/isc_gpio.c index c1eca456..35d5af5e 100644 --- a/drivers/media/platform/tegra/isc/isc_gpio.c +++ b/drivers/media/platform/tegra/isc/isc_gpio.c @@ -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, diff --git a/drivers/media/platform/tegra/isc/isc_mgr.c b/drivers/media/platform/tegra/isc/isc_mgr.c index 92bd05f6..73c83d7f 100644 --- a/drivers/media/platform/tegra/isc/isc_mgr.c +++ b/drivers/media/platform/tegra/isc/isc_mgr.c @@ -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 @@ -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); diff --git a/drivers/media/platform/tegra/isc/isc_pwm.c b/drivers/media/platform/tegra/isc/isc_pwm.c index 56fedac5..a3184a18 100644 --- a/drivers/media/platform/tegra/isc/isc_pwm.c +++ b/drivers/media/platform/tegra/isc/isc_pwm.c @@ -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 @@ -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); diff --git a/drivers/misc/bluedroid_pm.c b/drivers/misc/bluedroid_pm.c index 892f9ff9..5077ad5e 100644 --- a/drivers/misc/bluedroid_pm.c +++ b/drivers/misc/bluedroid_pm.c @@ -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 @@ -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, diff --git a/drivers/misc/nvsciipc/nvsciipc.c b/drivers/misc/nvsciipc/nvsciipc.c index b055f47f..27e25525 100644 --- a/drivers/misc/nvsciipc/nvsciipc.c +++ b/drivers/misc/nvsciipc/nvsciipc.c @@ -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, }, diff --git a/drivers/mtd/devices/tegra_hv_mtd.c b/drivers/mtd/devices/tegra_hv_mtd.c index 1b6acf97..bcf0d8c6 100644 --- a/drivers/mtd/devices/tegra_hv_mtd.c +++ b/drivers/mtd/devices/tegra_hv_mtd.c @@ -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 + #include #include #include /* 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, diff --git a/drivers/net/can/mttcan/native/m_ttcan_linux.c b/drivers/net/can/mttcan/native/m_ttcan_linux.c index b54aa907..08d68ff0 100644 --- a/drivers/net/can/mttcan/native/m_ttcan_linux.c +++ b/drivers/net/can/mttcan/native/m_ttcan_linux.c @@ -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, diff --git a/drivers/net/ethernet/mft/misc_drivers/bf3_livefish/bf3_livefish.c b/drivers/net/ethernet/mft/misc_drivers/bf3_livefish/bf3_livefish.c index 9f6cfd5e..b2af4e2a 100644 --- a/drivers/net/ethernet/mft/misc_drivers/bf3_livefish/bf3_livefish.c +++ b/drivers/net/ethernet/mft/misc_drivers/bf3_livefish/bf3_livefish.c @@ -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 #include "bf3_livefish.h" + #include #include #include @@ -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, }; diff --git a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c index 3b3c9b0c..d5f174cd 100644 --- a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c +++ b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c @@ -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", diff --git a/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/rtw_android.c b/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/rtw_android.c index 50dcfed9..c6ef5b2f 100644 --- a/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/rtw_android.c +++ b/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/rtw_android.c @@ -13,6 +13,8 @@ * *****************************************************************************/ +#include + #ifdef CONFIG_GPIO_WAKEUP #include #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 = { diff --git a/drivers/nvpmodel/nvpmodel-clk-cap.c b/drivers/nvpmodel/nvpmodel-clk-cap.c index 955fa49e..77970a63 100644 --- a/drivers/nvpmodel/nvpmodel-clk-cap.c +++ b/drivers/nvpmodel/nvpmodel-clk-cap.c @@ -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 #include #include @@ -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, diff --git a/drivers/nvpps/nvpps_main.c b/drivers/nvpps/nvpps_main.c index 9330cc88..4ab4e2ad 100644 --- a/drivers/nvpps/nvpps_main.c +++ b/drivers/nvpps/nvpps_main.c @@ -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, diff --git a/drivers/pci/controller/pcie-tegra-vf.c b/drivers/pci/controller/pcie-tegra-vf.c index 13cacf36..bf88a7c3 100644 --- a/drivers/pci/controller/pcie-tegra-vf.c +++ b/drivers/pci/controller/pcie-tegra-vf.c @@ -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 + #include #include #include @@ -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); diff --git a/drivers/platform/tegra/aon/tegra-aon-ivc-echo.c b/drivers/platform/tegra/aon/tegra-aon-ivc-echo.c index f6d20ea9..536375bd 100644 --- a/drivers/platform/tegra/aon/tegra-aon-ivc-echo.c +++ b/drivers/platform/tegra/aon/tegra-aon-ivc-echo.c @@ -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 #include #include @@ -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, diff --git a/drivers/platform/tegra/aon/tegra-aon-module.c b/drivers/platform/tegra/aon/tegra-aon-module.c index e44d16d1..883b3cd9 100644 --- a/drivers/platform/tegra/aon/tegra-aon-module.c +++ b/drivers/platform/tegra/aon/tegra-aon-module.c @@ -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 + #include #include #include @@ -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); diff --git a/drivers/platform/tegra/dce/dce-module.c b/drivers/platform/tegra/dce/dce-module.c index 00e705ee..22ae853e 100644 --- a/drivers/platform/tegra/dce/dce-module.c +++ b/drivers/platform/tegra/dce/dce-module.c @@ -15,6 +15,8 @@ * along with this program. If not, see . */ +#include + #include #include #include @@ -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); diff --git a/drivers/platform/tegra/mc-hwpm.c b/drivers/platform/tegra/mc-hwpm.c index 217c416a..50c4377f 100644 --- a/drivers/platform/tegra/mc-hwpm.c +++ b/drivers/platform/tegra/mc-hwpm.c @@ -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 + #include #include #include @@ -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) diff --git a/drivers/platform/tegra/mce/tegra23x-mce.c b/drivers/platform/tegra/mce/tegra23x-mce.c index 29b838a0..f83f55d7 100644 --- a/drivers/platform/tegra/mce/tegra23x-mce.c +++ b/drivers/platform/tegra/mce/tegra23x-mce.c @@ -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 + #include #include #include @@ -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", diff --git a/drivers/platform/tegra/nvadsp/dev.c b/drivers/platform/tegra/nvadsp/dev.c index 1f890d20..7959c4b8 100644 --- a/drivers/platform/tegra/nvadsp/dev.c +++ b/drivers/platform/tegra/nvadsp/dev.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only // SPDX-FileCopyrightText: Copyright (c) 2014-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +#include + #include #include #include @@ -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); diff --git a/drivers/platform/tegra/psc/tegra23x_psc_mailbox.c b/drivers/platform/tegra/psc/tegra23x_psc_mailbox.c index d3b9be28..bc4b2f78 100644 --- a/drivers/platform/tegra/psc/tegra23x_psc_mailbox.c +++ b/drivers/platform/tegra/psc/tegra23x_psc_mailbox.c @@ -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 #include #include @@ -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", diff --git a/drivers/platform/tegra/rtcpu/tegra-camera-rtcpu-base.c b/drivers/platform/tegra/rtcpu/tegra-camera-rtcpu-base.c index 19c32f73..2bfa5440 100644 --- a/drivers/platform/tegra/rtcpu/tegra-camera-rtcpu-base.c +++ b/drivers/platform/tegra/rtcpu/tegra-camera-rtcpu-base.c @@ -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 #include @@ -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); diff --git a/drivers/platform/tegra/tegra-cactmon-mc-all.c b/drivers/platform/tegra/tegra-cactmon-mc-all.c index 49d50c1c..7fe9ec5d 100644 --- a/drivers/platform/tegra/tegra-cactmon-mc-all.c +++ b/drivers/platform/tegra/tegra-cactmon-mc-all.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/platform/tegra/tegra-fsicom.c b/drivers/platform/tegra/tegra-fsicom.c index 27ff34fc..3e3dce29 100644 --- a/drivers/platform/tegra/tegra-fsicom.c +++ b/drivers/platform/tegra/tegra-fsicom.c @@ -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 @@ -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); diff --git a/drivers/platform/tegra/tegra-hv-xhci-debug.c b/drivers/platform/tegra/tegra-hv-xhci-debug.c index e269199f..c069eda0 100644 --- a/drivers/platform/tegra/tegra-hv-xhci-debug.c +++ b/drivers/platform/tegra/tegra-hv-xhci-debug.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/platform/tegra/tegra-hv-xhci.c b/drivers/platform/tegra/tegra-hv-xhci.c index 38e18b54..95b77561 100644 --- a/drivers/platform/tegra/tegra-hv-xhci.c +++ b/drivers/platform/tegra/tegra-hv-xhci.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/platform/tegra/tegra-uss-io-proxy.c b/drivers/platform/tegra/tegra-uss-io-proxy.c index de61695f..bd058d77 100644 --- a/drivers/platform/tegra/tegra-uss-io-proxy.c +++ b/drivers/platform/tegra/tegra-uss-io-proxy.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/platform/tegra/tegra_bootloader_debug.c b/drivers/platform/tegra/tegra_bootloader_debug.c index c2b3390b..9b42522b 100644 --- a/drivers/platform/tegra/tegra_bootloader_debug.c +++ b/drivers/platform/tegra/tegra_bootloader_debug.c @@ -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 + #include #include #include @@ -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, diff --git a/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c b/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c index 55e60f11..eeff2972 100644 --- a/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c +++ b/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c @@ -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 #include #include @@ -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) diff --git a/drivers/pwm/pwm-tegra-tachometer.c b/drivers/pwm/pwm-tegra-tachometer.c index 0812de26..76c1032b 100644 --- a/drivers/pwm/pwm-tegra-tachometer.c +++ b/drivers/pwm/pwm-tegra-tachometer.c @@ -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); diff --git a/drivers/ras/arm64-ras.c b/drivers/ras/arm64-ras.c index 28f4406d..33b0cc4b 100644 --- a/drivers/ras/arm64-ras.c +++ b/drivers/ras/arm64-ras.c @@ -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 #include #include @@ -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", diff --git a/drivers/rtc/nvvrs-pseq-rtc.c b/drivers/rtc/nvvrs-pseq-rtc.c index f22954b7..3908f676 100644 --- a/drivers/rtc/nvvrs-pseq-rtc.c +++ b/drivers/rtc/nvvrs-pseq-rtc.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/rtc/rtc-max77851.c b/drivers/rtc/rtc-max77851.c index 97fe5043..a858f749 100644 --- a/drivers/rtc/rtc-max77851.c +++ b/drivers/rtc/rtc-max77851.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/scsi/ufs/ufs-tegra-common.c b/drivers/scsi/ufs/ufs-tegra-common.c index 2dadfaf1..7f889440 100644 --- a/drivers/scsi/ufs/ufs-tegra-common.c +++ b/drivers/scsi/ufs/ufs-tegra-common.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - -#include +// SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. #include @@ -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, diff --git a/drivers/soc/tegra/fuse/kfuse.c b/drivers/soc/tegra/fuse/kfuse.c index 857648da..2bf6afa0 100644 --- a/drivers/soc/tegra/fuse/kfuse.c +++ b/drivers/soc/tegra/fuse/kfuse.c @@ -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 + #include #include #include @@ -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", diff --git a/drivers/spi/spi-tegra124-slave.c b/drivers/spi/spi-tegra124-slave.c index dfc1e1f6..519b5f8d 100644 --- a/drivers/spi/spi-tegra124-slave.c +++ b/drivers/spi/spi-tegra124-slave.c @@ -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); diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c index 2f5d885f..53b1b5c8 100644 --- a/drivers/spi/spi-tegra210-quad.c +++ b/drivers/spi/spi-tegra210-quad.c @@ -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); diff --git a/drivers/thermal/tegra234-oc-event.c b/drivers/thermal/tegra234-oc-event.c index 1bf8f23a..e7bfa4f7 100644 --- a/drivers/thermal/tegra234-oc-event.c +++ b/drivers/thermal/tegra234-oc-event.c @@ -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 #include #include @@ -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, diff --git a/drivers/thermal/thermal-trip-event.c b/drivers/thermal/thermal-trip-event.c index fd3f5006..504210d6 100644 --- a/drivers/thermal/thermal-trip-event.c +++ b/drivers/thermal/thermal-trip-event.c @@ -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 #include #include @@ -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); diff --git a/drivers/video/tegra/camera/tegra_camera_platform.c b/drivers/video/tegra/camera/tegra_camera_platform.c index 08b20c4f..f9592fbc 100644 --- a/drivers/video/tegra/camera/tegra_camera_platform.c +++ b/drivers/video/tegra/camera/tegra_camera_platform.c @@ -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 + #include #include #include @@ -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", diff --git a/drivers/video/tegra/host/capture/capture-support.c b/drivers/video/tegra/host/capture/capture-support.c index 9705bbbd..ecb0b403 100644 --- a/drivers/video/tegra/host/capture/capture-support.c +++ b/drivers/video/tegra/host/capture/capture-support.c @@ -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 + #include "capture-support.h" + #include #include #include @@ -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", diff --git a/drivers/video/tegra/host/isp/isp5.c b/drivers/video/tegra/host/isp/isp5.c index 0f0f7f76..516be7d6 100644 --- a/drivers/video/tegra/host/isp/isp5.c +++ b/drivers/video/tegra/host/isp/isp5.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only // SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +#include + #include #include #include @@ -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", diff --git a/drivers/video/tegra/host/nvcsi/nvcsi-t194.c b/drivers/video/tegra/host/nvcsi/nvcsi-t194.c index de40bf66..4e76118d 100644 --- a/drivers/video/tegra/host/nvcsi/nvcsi-t194.c +++ b/drivers/video/tegra/host/nvcsi/nvcsi-t194.c @@ -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 + #include "nvcsi-t194.h" + #include #include @@ -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", diff --git a/drivers/video/tegra/host/nvdla/nvdla.c b/drivers/video/tegra/host/nvdla/nvdla.c index 711c42b4..269a90b5 100644 --- a/drivers/video/tegra/host/nvdla/nvdla.c +++ b/drivers/video/tegra/host/nvdla/nvdla.c @@ -4,6 +4,8 @@ * NVDLA driver for T194/T23x */ +#include + #include #include #include @@ -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", diff --git a/drivers/video/tegra/host/pva/pva.c b/drivers/video/tegra/host/pva/pva.c index fece4a77..8258497e 100644 --- a/drivers/video/tegra/host/pva/pva.c +++ b/drivers/video/tegra/host/pva/pva.c @@ -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 + #include "pva_mailbox.h" + #include #include "nvpva_client.h" #include @@ -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", diff --git a/drivers/video/tegra/host/pva/pva_iommu_context_dev.c b/drivers/video/tegra/host/pva/pva_iommu_context_dev.c index 6454b72f..12435d31 100644 --- a/drivers/video/tegra/host/pva/pva_iommu_context_dev.c +++ b/drivers/video/tegra/host/pva/pva_iommu_context_dev.c @@ -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 + #include #include #include @@ -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", diff --git a/drivers/video/tegra/host/vi/vi5.c b/drivers/video/tegra/host/vi/vi5.c index 225a09a8..92143efe 100644 --- a/drivers/video/tegra/host/vi/vi5.c +++ b/drivers/video/tegra/host/vi/vi5.c @@ -4,6 +4,8 @@ * VI5 driver */ +#include + #include #include #include @@ -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", diff --git a/drivers/video/tegra/nvmap/nvmap_init.c b/drivers/video/tegra/nvmap/nvmap_init.c index 7efe2813..d98fd530 100644 --- a/drivers/video/tegra/nvmap/nvmap_init.c +++ b/drivers/video/tegra/nvmap/nvmap_init.c @@ -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 + #include #include #include @@ -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", diff --git a/drivers/video/tegra/tsec/tsec.c b/drivers/video/tegra/tsec/tsec.c index 21532d4a..a548863c 100644 --- a/drivers/video/tegra/tsec/tsec.c +++ b/drivers/video/tegra/tsec/tsec.c @@ -5,6 +5,8 @@ * Tegra TSEC Module Support */ +#include + #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", diff --git a/drivers/virt/tegra/tegra_hv.c b/drivers/virt/tegra/tegra_hv.c index ed31e52b..6abe034e 100644 --- a/drivers/virt/tegra/tegra_hv.c +++ b/drivers/virt/tegra/tegra_hv.c @@ -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 @@ -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) diff --git a/drivers/virt/tegra/tegra_hv_pm_ctl.c b/drivers/virt/tegra/tegra_hv_pm_ctl.c index c4c7a592..246b4376 100644 --- a/drivers/virt/tegra/tegra_hv_pm_ctl.c +++ b/drivers/virt/tegra/tegra_hv_pm_ctl.c @@ -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 @@ -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); diff --git a/drivers/virt/tegra/tegra_hv_vcpu_yield.c b/drivers/virt/tegra/tegra_hv_vcpu_yield.c index 66f8ff17..c423fa6d 100644 --- a/drivers/virt/tegra/tegra_hv_vcpu_yield.c +++ b/drivers/virt/tegra/tegra_hv_vcpu_yield.c @@ -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); diff --git a/drivers/watchdog/max77851_wdt.c b/drivers/watchdog/max77851_wdt.c index 502e11f7..b8244a06 100644 --- a/drivers/watchdog/max77851_wdt.c +++ b/drivers/watchdog/max77851_wdt.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/watchdog/softdog-platform.c b/drivers/watchdog/softdog-platform.c index 0064781d..154ebdb3 100644 --- a/drivers/watchdog/softdog-platform.c +++ b/drivers/watchdog/softdog-platform.c @@ -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 + #include #include #include @@ -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, }; diff --git a/drivers/watchdog/watchdog-tegra-t18x.c b/drivers/watchdog/watchdog-tegra-t18x.c index 3c8774a3..53464caf 100644 --- a/drivers/watchdog/watchdog-tegra-t18x.c +++ b/drivers/watchdog/watchdog-tegra-t18x.c @@ -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 #include #include @@ -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, diff --git a/sound/soc/tegra-virt-alt/tegra210_adsp_virt_alt.c b/sound/soc/tegra-virt-alt/tegra210_adsp_virt_alt.c index bb8c18f3..599ad234 100644 --- a/sound/soc/tegra-virt-alt/tegra210_adsp_virt_alt.c +++ b/sound/soc/tegra-virt-alt/tegra210_adsp_virt_alt.c @@ -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); diff --git a/sound/soc/tegra-virt-alt/tegra_virt_ref_alt.c b/sound/soc/tegra-virt-alt/tegra_virt_ref_alt.c index f0bd6166..13c71767 100644 --- a/sound/soc/tegra-virt-alt/tegra_virt_ref_alt.c +++ b/sound/soc/tegra-virt-alt/tegra_virt_ref_alt.c @@ -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 @@ -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); diff --git a/sound/soc/tegra/tegra186_arad.c b/sound/soc/tegra/tegra186_arad.c index 26ca3e3f..6de8732c 100644 --- a/sound/soc/tegra/tegra186_arad.c +++ b/sound/soc/tegra/tegra186_arad.c @@ -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) diff --git a/sound/soc/tegra/tegra210_adsp.c b/sound/soc/tegra/tegra210_adsp.c index e0123a39..226f0516 100644 --- a/sound/soc/tegra/tegra210_adsp.c +++ b/sound/soc/tegra/tegra210_adsp.c @@ -3,6 +3,8 @@ // // tegra210_adsp.c - Tegra ADSP audio driver +#include + #include #include #include @@ -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); diff --git a/sound/soc/tegra/tegra210_afc.c b/sound/soc/tegra/tegra210_afc.c index d7fefe2f..b22a0b40 100644 --- a/sound/soc/tegra/tegra210_afc.c +++ b/sound/soc/tegra/tegra210_afc.c @@ -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) diff --git a/sound/soc/tegra/tegra210_iqc.c b/sound/soc/tegra/tegra210_iqc.c index e680bdfb..2d20f87a 100644 --- a/sound/soc/tegra/tegra210_iqc.c +++ b/sound/soc/tegra/tegra210_iqc.c @@ -3,6 +3,8 @@ // // tegra210_iqc.c - Tegra210 IQC driver +#include + #include #include #include @@ -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) diff --git a/sound/soc/tegra/tegra_mixer_control.c b/sound/soc/tegra/tegra_mixer_control.c index cfa05f5d..da37e212 100644 --- a/sound/soc/tegra/tegra_mixer_control.c +++ b/sound/soc/tegra/tegra_mixer_control.c @@ -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); diff --git a/sound/tegra-safety-audio/sound-card.c b/sound/tegra-safety-audio/sound-card.c index 404fceb4..cca6fa11 100644 --- a/sound/tegra-safety-audio/sound-card.c +++ b/sound/tegra-safety-audio/sound-card.c @@ -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,