All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwspinlock: ignore disabled device
@ 2019-03-07 15:53 ` Fabien Dessenne
  0 siblings, 0 replies; 2+ messages in thread
From: Fabien Dessenne @ 2019-03-07 15:53 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, linux-remoteproc, linux-kernel
  Cc: Fabien Dessenne, Benjamin Gaignard

Do not wait for hwspinlock device registration if it is not available
for use.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
---
 drivers/hwspinlock/hwspinlock_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index 2bad40d..8d63bdc 100644
--- a/drivers/hwspinlock/hwspinlock_core.c
+++ b/drivers/hwspinlock/hwspinlock_core.c
@@ -333,6 +333,9 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
 	if (ret)
 		return ret;
 
+	if (!of_device_is_available(args.np))
+		return -ENOENT;
+
 	/* Find the hwspinlock device: we need its base_id */
 	ret = -EPROBE_DEFER;
 	rcu_read_lock();
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] hwspinlock: ignore disabled device
@ 2019-03-07 15:53 ` Fabien Dessenne
  0 siblings, 0 replies; 2+ messages in thread
From: Fabien Dessenne @ 2019-03-07 15:53 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, linux-remoteproc, linux-kernel
  Cc: Fabien Dessenne, Benjamin Gaignard

Do not wait for hwspinlock device registration if it is not available
for use.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
---
 drivers/hwspinlock/hwspinlock_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index 2bad40d..8d63bdc 100644
--- a/drivers/hwspinlock/hwspinlock_core.c
+++ b/drivers/hwspinlock/hwspinlock_core.c
@@ -333,6 +333,9 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
 	if (ret)
 		return ret;
 
+	if (!of_device_is_available(args.np))
+		return -ENOENT;
+
 	/* Find the hwspinlock device: we need its base_id */
 	ret = -EPROBE_DEFER;
 	rcu_read_lock();
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-07 15:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 15:53 [PATCH] hwspinlock: ignore disabled device Fabien Dessenne
2019-03-07 15:53 ` Fabien Dessenne

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.