794fd8c1dbbfb43d5f2a4a392960c840bdbb4e70
[openwrt/staging/stintel.git] / target / linux / d1 / patches-6.1 / 0068-ASoC-sun4i-spdif-Assert-reset-when-removing-the-devi.patch
1 From 1d85b3609cf4239f7e971b839f1ab985413cd560 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
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
7 This completes reversing the process done in the probe function.
8
9 Signed-off-by: Samuel Holland <samuel@sholland.org>
10 ---
11 sound/soc/sunxi/sun4i-spdif.c | 4 ++++
12 1 file changed, 4 insertions(+)
13
14 --- a/sound/soc/sunxi/sun4i-spdif.c
15 +++ b/sound/soc/sunxi/sun4i-spdif.c
16 @@ -705,10 +705,14 @@ err_unregister:
17
18 static int sun4i_spdif_remove(struct platform_device *pdev)
19 {
20 + struct sun4i_spdif_dev *host = dev_get_drvdata(&pdev->dev);
21 +
22 pm_runtime_disable(&pdev->dev);
23 if (!pm_runtime_status_suspended(&pdev->dev))
24 sun4i_spdif_runtime_suspend(&pdev->dev);
25
26 + reset_control_assert(host->rst);
27 +
28 return 0;
29 }
30