mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
tegra: hwpm: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the Tegra HWPM driver
as necessary to fix this.
Bug 4749580
Change-Id: Ide44224bb3e5d0a000a252b4a8117ca203904a54
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3183043
(cherry picked from commit 11de2bc045)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3185776
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1e751f52f0
commit
d47dc62f40
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
* Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
@@ -251,9 +251,21 @@ static int tegra_hwpm_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||||
|
static inline void tegra_hwpm_remove_wrapper(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
tegra_hwpm_remove(pdev);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int tegra_hwpm_remove_wrapper(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
return tegra_hwpm_remove(pdev);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct platform_driver tegra_soc_hwpm_pdrv = {
|
static struct platform_driver tegra_soc_hwpm_pdrv = {
|
||||||
.probe = tegra_hwpm_probe,
|
.probe = tegra_hwpm_probe,
|
||||||
.remove = tegra_hwpm_remove,
|
.remove = tegra_hwpm_remove_wrapper,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = TEGRA_SOC_HWPM_MODULE_NAME,
|
.name = TEGRA_SOC_HWPM_MODULE_NAME,
|
||||||
.of_match_table = of_match_ptr(tegra_soc_hwpm_of_match),
|
.of_match_table = of_match_ptr(tegra_soc_hwpm_of_match),
|
||||||
|
|||||||
Reference in New Issue
Block a user