From: Fabien Dessenne <fabien.dessenne@st.com> To: Ohad Ben-Cohen <ohad@wizery.com>, Bjorn Andersson <bjorn.andersson@linaro.org>, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Fabien Dessenne <fabien.dessenne@st.com>, Benjamin Gaignard <benjamin.gaignard@st.com> Subject: [PATCH v2] hwspinlock: ignore disabled device Date: Fri, 8 Mar 2019 17:53:46 +0100 [thread overview] Message-ID: <1552064026-11415-1-git-send-email-fabien.dessenne@st.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Fabien Dessenne <fabien.dessenne@st.com> To: Ohad Ben-Cohen <ohad@wizery.com>, Bjorn Andersson <bjorn.andersson@linaro.org>, <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org> Cc: Fabien Dessenne <fabien.dessenne@st.com>, Benjamin Gaignard <benjamin.gaignard@st.com> Subject: [PATCH v2] hwspinlock: ignore disabled device Date: Fri, 8 Mar 2019 17:53:46 +0100 [thread overview] Message-ID: <1552064026-11415-1-git-send-email-fabien.dessenne@st.com> (raw) 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
next reply other threads:[~2019-03-08 16:53 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-08 16:53 Fabien Dessenne [this message] 2019-03-08 16:53 ` [PATCH v2] hwspinlock: ignore disabled device Fabien Dessenne 2019-05-13 9:08 ` Fabien DESSENNE 2019-05-31 14:02 ` Suman Anna 2019-05-31 14:02 ` Suman Anna 2019-06-29 19:05 ` Bjorn Andersson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1552064026-11415-1-git-send-email-fabien.dessenne@st.com \ --to=fabien.dessenne@st.com \ --cc=benjamin.gaignard@st.com \ --cc=bjorn.andersson@linaro.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-remoteproc@vger.kernel.org \ --cc=ohad@wizery.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.