]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
HSI: omap_ssi: fix removal of port platform device
authorSebastian Reichel <sre@kernel.org>
Sat, 30 Apr 2016 01:23:27 +0000 (03:23 +0200)
committerSebastian Reichel <sre@kernel.org>
Mon, 2 May 2016 19:56:17 +0000 (21:56 +0200)
This avoids removal of the HSI port device when
only the platform port device should be removed
and clears the POPULATED bit in the DT node, so
that a new platform device is created when the
driver is probed again.

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

index ffb921482e768cf6937afa3ad36062d150de6fe5..68dfdaa19938bb6ada1e524d8166f6773305b391 100644 (file)
@@ -451,6 +451,10 @@ static int ssi_remove_ports(struct device *dev, void *c)
 {
        struct platform_device *pdev = to_platform_device(dev);
 
+       if (!dev->of_node)
+               return 0;
+
+       of_node_clear_flag(dev->of_node, OF_POPULATED);
        of_device_unregister(pdev);
 
        return 0;