mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
PCI: tegra264: 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 Tegra264 PCI drivers as necessary to ensure that they can be built for Linux v6.11+ kernels. Bug 4749580 Bug 4911768 Change-Id: I9081f7cb61e9020ec8c1462a3c1b21118d7025bc Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233981 Reviewed-by: Brad Griffis <bgriffis@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
|
||||
/*
|
||||
* PCIe EP controller driver for Tegra264 SoC
|
||||
*
|
||||
* Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Author: Manikanta Maddireddy <mmaddireddy@nvidia.com>
|
||||
*/
|
||||
|
||||
@@ -802,9 +801,21 @@ static const struct dev_pm_ops tegra264_pcie_ep_dev_pm_ops = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static void tegra264_pcie_ep_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
tegra264_pcie_ep_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static int tegra264_pcie_ep_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return tegra264_pcie_ep_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct platform_driver tegra264_pcie_ep_driver = {
|
||||
.probe = tegra264_pcie_ep_probe,
|
||||
.remove = tegra264_pcie_ep_remove,
|
||||
.remove = tegra264_pcie_ep_remove_wrapper,
|
||||
.driver = {
|
||||
.name = "tegra264-pcie-ep",
|
||||
.of_match_table = tegra264_pcie_ep_of_match,
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
|
||||
/*
|
||||
* PCIe host controller driver for Tegra264 SoC
|
||||
*
|
||||
* Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Author: Manikanta Maddireddy <mmaddireddy@nvidia.com>
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
@@ -324,9 +325,21 @@ static const struct of_device_id tegra264_pcie_of_match[] = {
|
||||
{},
|
||||
};
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static void tegra264_pcie_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
tegra264_pcie_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static int tegra264_pcie_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return tegra264_pcie_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct platform_driver tegra264_pcie_driver = {
|
||||
.probe = tegra264_pcie_probe,
|
||||
.remove = tegra264_pcie_remove,
|
||||
.remove = tegra264_pcie_remove_wrapper,
|
||||
.driver = {
|
||||
.name = "tegra264-pcie",
|
||||
.pm = &tegra264_pcie_pm_ops,
|
||||
|
||||
Reference in New Issue
Block a user