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
@@ -2,9 +2,11 @@
|
||||
/*
|
||||
* RTC driver for NVIDIA Voltage Regulator Power Sequencer
|
||||
*
|
||||
* Copyright (C) 2022-2023 NVIDIA CORPORATION. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -520,13 +522,25 @@ static const struct platform_device_id nvvrs_rtc_id[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, nvvrs_rtc_id);
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static inline void nvvrs_rtc_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
nvvrs_rtc_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static inline int nvvrs_rtc_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return nvvrs_rtc_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct platform_driver nvvrs_rtc_driver = {
|
||||
.driver = {
|
||||
.name = "nvvrs-pseq-rtc",
|
||||
.pm = &nvvrs_rtc_pm_ops,
|
||||
},
|
||||
.probe = nvvrs_rtc_probe,
|
||||
.remove = nvvrs_rtc_remove,
|
||||
.remove = nvvrs_rtc_remove_wrapper,
|
||||
.shutdown = nvvrs_rtc_shutdown,
|
||||
.id_table = nvvrs_rtc_id,
|
||||
};
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
/*
|
||||
* RTC driver for Maxim MAX77851
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/rtc.h>
|
||||
@@ -874,6 +876,18 @@ static const struct platform_device_id rtc_id[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, rtc_id);
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static inline void max77851_rtc_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
max77851_rtc_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static inline int max77851_rtc_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return max77851_rtc_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct platform_driver max77851_rtc_driver = {
|
||||
.driver = {
|
||||
.name = "max77851-rtc",
|
||||
@@ -881,7 +895,7 @@ static struct platform_driver max77851_rtc_driver = {
|
||||
},
|
||||
.probe = max77851_rtc_probe,
|
||||
.shutdown = max77851_rtc_shutdown,
|
||||
.remove = max77851_rtc_remove,
|
||||
.remove = max77851_rtc_remove_wrapper,
|
||||
.id_table = rtc_id,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user