2
0

0011-03-nss_dp_main-swap-dp_exit-function-call.patch 943 B

1234567891011121314151617181920212223242526272829303132333435
  1. From ab7b1a361d51157118e1a61ce6530a59bcef4b61 Mon Sep 17 00:00:00 2001
  2. From: Christian Marangi <[email protected]>
  3. Date: Tue, 16 Apr 2024 16:10:09 +0200
  4. Subject: [PATCH 3/6] nss_dp_main: swap dp_exit function call
  5. First unregister nss_dp platform devices then cleanup the HAL.
  6. This is to fix kernel panic by cleaning data that needs to be used by
  7. platform driver unregister functions.
  8. Signed-off-by: Christian Marangi <[email protected]>
  9. ---
  10. nss_dp_main.c | 4 ++--
  11. 1 file changed, 2 insertions(+), 2 deletions(-)
  12. --- a/nss_dp_main.c
  13. +++ b/nss_dp_main.c
  14. @@ -1161,6 +1161,8 @@ int __init nss_dp_init(void)
  15. */
  16. void __exit nss_dp_exit(void)
  17. {
  18. + platform_driver_unregister(&nss_dp_drv);
  19. +
  20. /*
  21. * TODO Move this to soc_ops
  22. */
  23. @@ -1168,8 +1170,6 @@ void __exit nss_dp_exit(void)
  24. nss_dp_hal_cleanup();
  25. dp_global_ctx.common_init_done = false;
  26. }
  27. -
  28. - platform_driver_unregister(&nss_dp_drv);
  29. }
  30. module_init(nss_dp_init);