mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10: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
@@ -1189,6 +1189,18 @@ MODULE_DEVICE_TABLE(of, nvpps_of_table);
|
||||
#endif /* !NVPPS_NO_DT */
|
||||
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static inline void nvpps_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
nvpps_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static inline int nvpps_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return nvpps_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct platform_driver nvpps_plat_driver = {
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
@@ -1198,7 +1210,7 @@ static struct platform_driver nvpps_plat_driver = {
|
||||
#endif /* !NVPPS_NO_DT */
|
||||
},
|
||||
.probe = nvpps_probe,
|
||||
.remove = nvpps_remove,
|
||||
.remove = nvpps_remove_wrapper,
|
||||
#ifdef CONFIG_PM
|
||||
.suspend = nvpps_suspend,
|
||||
.resume = nvpps_resume,
|
||||
|
||||
Reference in New Issue
Block a user