2019-03-08 16:54:41

by Fabien DESSENNE

[permalink] [raw]
Subject: [PATCH v2] hwspinlock: ignore disabled device

Do not wait for hwspinlock device registration if it is not available
for use.

Signed-off-by: Fabien Dessenne <[email protected]>
---
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



2019-05-13 09:17:21

by Fabien DESSENNE

[permalink] [raw]
Subject: Re: [PATCH v2] hwspinlock: ignore disabled device

Hi


Gentle reminder


Fabien

On 08/03/2019 5:53 PM, Fabien Dessenne wrote:
> Do not wait for hwspinlock device registration if it is not available
> for use.
>
> Signed-off-by: Fabien Dessenne <[email protected]>
> ---
> 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();

2019-05-31 14:05:50

by Suman Anna

[permalink] [raw]
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 <[email protected]>

Acked-by: Suman Anna <[email protected]>

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

2019-06-29 19:07:16

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2] hwspinlock: ignore disabled device

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 <[email protected]>

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
>