mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
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:
committed by
mobile promotions
parent
e7b93be004
commit
951b2423a8
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2013 NVIDIA Corporation
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
@@ -4082,6 +4082,18 @@ static const struct dev_pm_ops tegra_sor_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(tegra_sor_suspend, tegra_sor_resume)
|
||||
};
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static inline void tegra_sor_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
tegra_sor_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static inline int tegra_sor_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return tegra_sor_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
struct platform_driver tegra_sor_driver = {
|
||||
.driver = {
|
||||
.name = "tegra-sor",
|
||||
@@ -4089,5 +4101,5 @@ struct platform_driver tegra_sor_driver = {
|
||||
.pm = &tegra_sor_pm_ops,
|
||||
},
|
||||
.probe = tegra_sor_probe,
|
||||
.remove = tegra_sor_remove,
|
||||
.remove = tegra_sor_remove_wrapper,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user