summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2019-03-08 19:53:46 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2019-06-29 22:05:06 +0300
commitfbd7330c9fd8ef00bf231ec7e57b0f05384f462d (patch)
treedb8cff0db333bb8ab29708a0580fb774a89527bd
parentd4d98bba3ea58e80b9f500cbd98b38b98e8167f2 (diff)
downloadlinux-fbd7330c9fd8ef00bf231ec7e57b0f05384f462d.tar.xz
hwspinlock: ignore disabled device
Do not wait for hwspinlock device registration if it is not available for use. Acked-by: Suman Anna <s-anna@ti.com> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r--drivers/hwspinlock/hwspinlock_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index 2bad40d42210..d806307f19c2 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();