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
(cherry picked from commit 951b2423a8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3210788
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c463c63993
commit
15ca4ff659
@@ -7048,12 +7048,24 @@ static const struct of_device_id ether_of_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ether_of_match);
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
static inline void ether_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
ether_remove(pdev);
|
||||
}
|
||||
#else
|
||||
static inline int ether_remove_wrapper(struct platform_device *pdev)
|
||||
{
|
||||
return ether_remove(pdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Ethernet platform driver instance
|
||||
*/
|
||||
static struct platform_driver ether_driver = {
|
||||
.probe = ether_probe,
|
||||
.remove = ether_remove,
|
||||
.remove = ether_remove_wrapper,
|
||||
.shutdown = ether_shutdown,
|
||||
.driver = {
|
||||
.name = "nvethernet",
|
||||
|
||||
Reference in New Issue
Block a user