[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9059d73-9849-7105-6080-5d3d994335f3@ti.com>
Date: Fri, 31 May 2019 09:02:23 -0500
From: Suman Anna <s-anna@...com>
To: Fabien Dessenne <fabien.dessenne@...com>,
Ohad Ben-Cohen <ohad@...ery.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
<linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Benjamin Gaignard <benjamin.gaignard@...com>
Subject: Re: [PATCH v2] hwspinlock: ignore disabled device
On 3/8/19 10:53 AM, Fabien Dessenne wrote:
> Do not wait for hwspinlock device registration if it is not available
> for use.
>
> Signed-off-by: Fabien Dessenne <fabien.dessenne@...com>
Acked-by: Suman Anna <s-anna@...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();
>
Powered by blists - more mailing lists