nvsciipc: add shutdown callback

print kernel message during system shutdown

JIRA NVIPC-3318

Change-Id: Ib6025c4058fc2f03d89d44e0c6f2ee90073ba8e2
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3309294
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
Joshua Cha
2025-02-25 13:16:11 +09:00
committed by Jon Hunter
parent 937203519c
commit da67f89f15

View File

@@ -916,7 +916,7 @@ static int nvsciipc_remove(struct platform_device *pdev)
nvsciipc_cleanup(ctx); nvsciipc_cleanup(ctx);
exit: exit:
INFO("Unloaded module\n"); ERR("Unloaded module\n");
return 0; return 0;
} }
@@ -933,6 +933,11 @@ static int nvsciipc_remove_wrapper(struct platform_device *pdev)
} }
#endif #endif
static void nvsciipc_shutdown(struct platform_device *pdev)
{
dev_err(&pdev->dev, "nvipc: Shutting down");
nvsciipc_remove(pdev);
}
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int nvsciipc_suspend(struct platform_device *pdev, pm_message_t state) static int nvsciipc_suspend(struct platform_device *pdev, pm_message_t state)
@@ -953,6 +958,7 @@ static int nvsciipc_resume(struct platform_device *pdev)
static struct platform_driver nvsciipc_driver = { static struct platform_driver nvsciipc_driver = {
.probe = nvsciipc_probe, .probe = nvsciipc_probe,
.remove = nvsciipc_remove_wrapper, .remove = nvsciipc_remove_wrapper,
.shutdown = nvsciipc_shutdown,
.driver = { .driver = {
.name = MODULE_NAME, .name = MODULE_NAME,
}, },