All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
	"Pali Rohár" <pali.rohar@gmail.com>
Subject: [PATCH 4/6] HSI: omap_ssi: fix removal of port platform device
Date: Sat, 30 Apr 2016 04:09:11 +0200	[thread overview]
Message-ID: <1461982153-19139-5-git-send-email-sre@kernel.org> (raw)
In-Reply-To: <1461982153-19139-1-git-send-email-sre@kernel.org>

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.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/hsi/controllers/omap_ssi.c | 4 ++++
 1 file changed, 4 insertions(+)

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;
-- 
2.8.1

  parent reply	other threads:[~2016-04-30  2:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30  2:09 [PATCH 0/6] omap-ssi cleanups + dvfs support Sebastian Reichel
2016-04-30  2:09 ` [PATCH 1/6] HSI: omap_ssi_port: switch to gpiod API Sebastian Reichel
2016-05-02  7:06   ` Pavel Machek
2016-04-30  2:09 ` [PATCH 2/6] HSI: omap_ssi: fix module unloading Sebastian Reichel
2016-05-02  7:06   ` Pavel Machek
2016-04-30  2:09 ` [PATCH 3/6] HSI: omap_ssi: make sure probe stays available Sebastian Reichel
2016-04-30  2:09 ` Sebastian Reichel [this message]
2016-05-01  9:41   ` [PATCH 4/6] HSI: omap_ssi: fix removal of port platform device Pavel Machek
2016-04-30  2:09 ` [PATCH 5/6] HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module Sebastian Reichel
2016-05-01  9:43   ` Pavel Machek
2016-05-01 19:34     ` Sebastian Reichel
2016-05-01 21:22       ` Pavel Machek
2016-05-03 17:32   ` Tony Lindgren
2016-05-09 20:43     ` Sebastian Reichel
2016-05-09 21:35       ` Tony Lindgren
2016-04-30  2:09 ` [PATCH 6/6] HSI: omap-ssi: add clk change support Sebastian Reichel
2016-05-01 10:03   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461982153-19139-5-git-send-email-sre@kernel.org \
    --to=sre@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.