mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
i2c: tegra-slave: 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 I2C Slave driver accordingly to fix the build for Linux v6.11+ kernels. Bug 4749580 Bug 5440303 Change-Id: Ic1d7d9b320e324b4847011af625e7e8e3f88d28a Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3440226 Reviewed-by: Brad Griffis <bgriffis@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2ca91098aa
commit
69f69d9b7f
@@ -1,6 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -403,6 +405,18 @@ static int tegra_i2cslv_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static void tegra_i2cslv_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
tegra_i2cslv_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static int tegra_i2cslv_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return tegra_i2cslv_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra_i2cslv_suspend(struct device *dev)
|
||||
{
|
||||
@@ -445,7 +459,7 @@ MODULE_DEVICE_TABLE(of, tegra_i2cslv_of_match);
|
||||
|
||||
static struct platform_driver tegra_i2cslv_driver = {
|
||||
.probe = tegra_i2cslv_probe,
|
||||
.remove = tegra_i2cslv_remove,
|
||||
.remove = tegra_i2cslv_remove_wrapper,
|
||||
.driver = {
|
||||
.name = "tegra-i2cslv",
|
||||
.owner = THIS_MODULE,
|
||||
|
||||
Reference in New Issue
Block a user