summaryrefslogtreecommitdiffstats
path: root/drivers/hsi/controllers
diff options
context:
space:
mode:
authorSebastian Reichel <sre@kernel.org>2016-04-30 03:23:27 +0200
committerSebastian Reichel <sre@kernel.org>2016-05-02 21:56:17 +0200
commit2a57aba8503d5694ee113016cb1a107831b8236f (patch)
tree793d84aad331b69534565d60d1559452382998e8 /drivers/hsi/controllers
parent0845e1f20af100d1d4ac7cc111a8dfb790f94a16 (diff)
downloadlinux-2a57aba8503d5694ee113016cb1a107831b8236f.tar.gz
linux-2a57aba8503d5694ee113016cb1a107831b8236f.tar.bz2
linux-2a57aba8503d5694ee113016cb1a107831b8236f.zip
HSI: omap_ssi: fix removal of port platform device
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>
Diffstat (limited to 'drivers/hsi/controllers')
-rw-r--r--drivers/hsi/controllers/omap_ssi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hsi/controllers/omap_ssi.c b/drivers/hsi/controllers/omap_ssi.c
index ffb921482e76..68dfdaa19938 100644
--- a/drivers/hsi/controllers/omap_ssi.c
+++ b/drivers/hsi/controllers/omap_ssi.c
@@ -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;