0068-ASoC-sun4i-spdif-Assert-reset-when-removing-the-devi.patch 854 B

123456789101112131415161718192021222324252627282930
  1. From 1d85b3609cf4239f7e971b839f1ab985413cd560 Mon Sep 17 00:00:00 2001
  2. From: Samuel Holland <[email protected]>
  3. Date: Sat, 13 Nov 2021 11:12:14 -0600
  4. Subject: [PATCH 068/117] ASoC: sun4i-spdif: Assert reset when removing the
  5. device
  6. This completes reversing the process done in the probe function.
  7. Signed-off-by: Samuel Holland <[email protected]>
  8. ---
  9. sound/soc/sunxi/sun4i-spdif.c | 4 ++++
  10. 1 file changed, 4 insertions(+)
  11. --- a/sound/soc/sunxi/sun4i-spdif.c
  12. +++ b/sound/soc/sunxi/sun4i-spdif.c
  13. @@ -710,10 +710,14 @@ err_unregister:
  14. static int sun4i_spdif_remove(struct platform_device *pdev)
  15. {
  16. + struct sun4i_spdif_dev *host = dev_get_drvdata(&pdev->dev);
  17. +
  18. pm_runtime_disable(&pdev->dev);
  19. if (!pm_runtime_status_suspended(&pdev->dev))
  20. sun4i_spdif_runtime_suspend(&pdev->dev);
  21. + reset_control_assert(host->rst);
  22. +
  23. return 0;
  24. }