drivers: Fix platform_driver remove for Linux v6.11

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

Bug 4749580

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

View File

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

View File

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