summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2021-05-14 19:12:46 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2021-05-23 03:52:40 +0300
commitc858401cb4a884b840fa3214b8999e8feba3a59b (patch)
treeda42be2a6099a5c568a66b0b8c49726ffcb5be16 /drivers
parentdaeec7388eb2c5dbff17630b76c22786ffa1e55a (diff)
downloadlinux-c858401cb4a884b840fa3214b8999e8feba3a59b.tar.xz
crypto: sa2ul - Remove child devices in remove
The sa_ul_probe creates child devices using of_platform_populate(), but these are not cleaned up in driver remove. Clean these up by removing the child devices using of_platform_depopulate(). Signed-off-by: Suman Anna <s-anna@ti.com> Reviewed-by: Tero Kristo <kristo@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/sa2ul.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
index 216702fef945..51bb69bc573c 100644
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -2467,6 +2467,8 @@ static int sa_ul_remove(struct platform_device *pdev)
{
struct sa_crypto_data *dev_data = platform_get_drvdata(pdev);
+ of_platform_depopulate(&pdev->dev);
+
sa_unregister_algos(&pdev->dev);
dma_release_channel(dev_data->dma_rx2);