* [PATCH] hwspinlock: ignore disabled device
@ 2019-03-07 15:53 Fabien Dessenne
0 siblings, 0 replies; only message 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 [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-07 15:53 UTC | newest]
Thread overview: (only message) (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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®