diff --git a/drivers/gpu/host1x-emu/dev.c b/drivers/gpu/host1x-emu/dev.c index dd1c1eb6..cceabfd3 100644 --- a/drivers/gpu/host1x-emu/dev.c +++ b/drivers/gpu/host1x-emu/dev.c @@ -348,6 +348,18 @@ static const struct dev_pm_ops host1x_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(host1x_runtime_suspend, host1x_runtime_resume) }; +#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */ +static inline void host1x_remove_wrapper(struct platform_device *pdev) +{ + host1x_remove(pdev); +} +#else +static inline int host1x_remove_wrapper(struct platform_device *pdev) +{ + return host1x_remove(pdev); +} +#endif + static struct platform_driver tegra_host1x_driver = { .driver = { .name = "tegra-host1x-emu", @@ -355,7 +367,7 @@ static struct platform_driver tegra_host1x_driver = { .pm = &host1x_pm_ops, }, .probe = host1x_probe, - .remove = host1x_remove, + .remove = host1x_remove_wrapper, }; static struct platform_driver * const drivers[] = {