Message ID | 1551973980-23547-1-git-send-email-fabien.dessenne@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hwspinlock: ignore disabled device | expand |
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();
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(+)