From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 29 Jun 2019 12:05:27 -0700 From: Bjorn Andersson Subject: Re: [PATCH v2] hwspinlock: ignore disabled device Message-ID: <20190629190527.GG23094@builder> References: <1552064026-11415-1-git-send-email-fabien.dessenne@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1552064026-11415-1-git-send-email-fabien.dessenne@st.com> To: Fabien Dessenne Cc: Ohad Ben-Cohen , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Gaignard List-ID: On Fri 08 Mar 08:53 PST 2019, Fabien Dessenne wrote: > Do not wait for hwspinlock device registration if it is not available > for use. > > Signed-off-by: Fabien Dessenne Applied with Suman's ack Thanks, Bjorn > --- > 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 >