diff --git a/drivers/tegra/hwpm/os/linux/driver.c b/drivers/tegra/hwpm/os/linux/driver.c index cf5c531..f16bcda 100644 --- a/drivers/tegra/hwpm/os/linux/driver.c +++ b/drivers/tegra/hwpm/os/linux/driver.c @@ -253,9 +253,21 @@ static int tegra_hwpm_remove(struct platform_device *pdev) return 0; } +#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */ +static inline void tegra_hwpm_remove_wrapper(struct platform_device *pdev) +{ + tegra_hwpm_remove(pdev); +} +#else +static inline int tegra_hwpm_remove_wrapper(struct platform_device *pdev) +{ + return tegra_hwpm_remove(pdev); +} +#endif + static struct platform_driver tegra_soc_hwpm_pdrv = { .probe = tegra_hwpm_probe, - .remove = tegra_hwpm_remove, + .remove = tegra_hwpm_remove_wrapper, .driver = { .name = TEGRA_SOC_HWPM_MODULE_NAME, .of_match_table = of_match_ptr(tegra_soc_hwpm_of_match),