mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
misc: tegra-cec: 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 CEC driver as necessary to fix this. Bug 4749580 Change-Id: I3cd34f41e519240ff48378e79bb654cf78767085 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276923 Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0cac4c3b02
commit
66afcf9c40
@@ -1,5 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
@@ -749,14 +751,12 @@ cec_error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tegra_cec_remove(struct platform_device *pdev)
|
||||
static void tegra_cec_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct tegra_cec *cec = platform_get_drvdata(pdev);
|
||||
|
||||
misc_deregister(&cec->misc_dev);
|
||||
cancel_work_sync(&cec->work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@@ -803,6 +803,20 @@ static struct of_device_id tegra_cec_of_match[] = {
|
||||
{},
|
||||
};
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static void tegra_cec_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
tegra_cec_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static int tegra_cec_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
tegra_cec_remove(pdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct platform_driver tegra_cec_driver = {
|
||||
.driver = {
|
||||
.name = TEGRA_CEC_NAME,
|
||||
@@ -811,7 +825,7 @@ static struct platform_driver tegra_cec_driver = {
|
||||
.of_match_table = of_match_ptr(tegra_cec_of_match),
|
||||
},
|
||||
.probe = tegra_cec_probe,
|
||||
.remove = tegra_cec_remove,
|
||||
.remove = tegra_cec_remove_wrapper,
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
.suspend = tegra_cec_suspend,
|
||||
|
||||
@@ -37,7 +37,6 @@ struct tegra_cec {
|
||||
u8 tx_buf_cnt;
|
||||
struct reset_control *reset;
|
||||
};
|
||||
static int tegra_cec_remove(struct platform_device *pdev);
|
||||
|
||||
#define TEGRA_CEC_LADDR_BROADCAST 0xF
|
||||
#define TEGRA_CEC_LADDR_MASK 0xF
|
||||
|
||||
Reference in New Issue
Block a user