lkml.org 
[lkml]   [2019]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] hwspinlock: ignore disabled device
Date
Do not wait for hwspinlock device registration if it is not available
for use.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
---
V2: use 'goto out' instead of 'return'

drivers/hwspinlock/hwspinlock_core.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index 2bad40d..d806307 100644
--- a/drivers/hwspinlock/hwspinlock_core.c
+++ b/drivers/hwspinlock/hwspinlock_core.c
@@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
if (ret)
return ret;

+ if (!of_device_is_available(args.np)) {
+ ret = -ENOENT;
+ goto out;
+ }
+
/* Find the hwspinlock device: we need its base_id */
ret = -EPROBE_DEFER;
rcu_read_lock();
--
2.7.4
\
 
 \ /
  Last update: 2019-03-08 17:55    [W:0.100 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site