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>
This commit is contained in:
Fabien Dessenne 2019-03-08 17:53:46 +01:00 committed by Bjorn Andersson
parent d4d98bba3e
commit fbd7330c9f
1 changed files with 5 additions and 0 deletions

View File

@ -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();