]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
HSI: omap_ssi: fix module unloading
authorSebastian Reichel <sre@kernel.org>
Fri, 29 Apr 2016 22:07:35 +0000 (00:07 +0200)
committerSebastian Reichel <sre@kernel.org>
Mon, 2 May 2016 19:56:01 +0000 (21:56 +0200)
Removal of ssi controller debugfs directory must
happen after the clients have been removed from
it.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/hsi/controllers/omap_ssi.c

index c582229d1cd20d7d709ffdfae65e9be7d993c4ab..2dd46b219af2f0ad9bdb62ceb0bcac306b625296 100644 (file)
@@ -526,6 +526,9 @@ static int __exit ssi_remove(struct platform_device *pd)
 {
        struct hsi_controller *ssi = platform_get_drvdata(pd);
 
+       /* cleanup of of_platform_populate() call */
+       device_for_each_child(&pd->dev, NULL, ssi_remove_ports);
+
 #ifdef CONFIG_DEBUG_FS
        ssi_debug_remove_ctrl(ssi);
 #endif
@@ -534,9 +537,6 @@ static int __exit ssi_remove(struct platform_device *pd)
 
        pm_runtime_disable(&pd->dev);
 
-       /* cleanup of of_platform_populate() call */
-       device_for_each_child(&pd->dev, NULL, ssi_remove_ports);
-
        return 0;
 }