2015-06-17 16:54:12

by Suman Anna

[permalink] [raw]
Subject: [PATCH] of: define of_find_node_by_phandle for !CONFIG_OF

Define stub implementation for of_find_node_by_phandle() API
so that users of this API can build properly even when CONFIG_OF
is not defined.

Signed-off-by: Suman Anna <[email protected]>
---
include/linux/of.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index ddeaae6d2083..90dfdc47ae26 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -422,6 +422,11 @@ static inline struct device_node *of_find_node_opts_by_path(const char *path,
return NULL;
}

+static inline struct device_node *of_find_node_by_phandle(phandle handle)
+{
+ return NULL;
+}
+
static inline struct device_node *of_get_parent(const struct device_node *node)
{
return NULL;
--
2.4.1


2015-06-17 23:34:02

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH] of: define of_find_node_by_phandle for !CONFIG_OF

On Wed, Jun 17, 2015 at 11:53 AM, Suman Anna <[email protected]> wrote:
> Define stub implementation for of_find_node_by_phandle() API
> so that users of this API can build properly even when CONFIG_OF
> is not defined.
>
> Signed-off-by: Suman Anna <[email protected]>

Do you have a user for this? If not, apply it when you do.

Acked-by: Rob Herring <[email protected]>

> ---
> include/linux/of.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index ddeaae6d2083..90dfdc47ae26 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -422,6 +422,11 @@ static inline struct device_node *of_find_node_opts_by_path(const char *path,
> return NULL;
> }
>
> +static inline struct device_node *of_find_node_by_phandle(phandle handle)
> +{
> + return NULL;
> +}
> +
> static inline struct device_node *of_get_parent(const struct device_node *node)
> {
> return NULL;
> --
> 2.4.1
>

2015-06-18 17:25:21

by Suman Anna

[permalink] [raw]
Subject: Re: [PATCH] of: define of_find_node_by_phandle for !CONFIG_OF

On 06/17/2015 06:33 PM, Rob Herring wrote:
> On Wed, Jun 17, 2015 at 11:53 AM, Suman Anna <[email protected]> wrote:
>> Define stub implementation for of_find_node_by_phandle() API
>> so that users of this API can build properly even when CONFIG_OF
>> is not defined.
>>
>> Signed-off-by: Suman Anna <[email protected]>
>
> Do you have a user for this? If not, apply it when you do.

Yeah, ran into a randconfig build problem on x86 when we tried to add an
API to remoteproc core [1] that used this function.

regards
Suman

[1] http://marc.info/?l=devicetree&m=143232772426559&w=2

>
> Acked-by: Rob Herring <[email protected]>
>
>> ---
>> include/linux/of.h | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/include/linux/of.h b/include/linux/of.h
>> index ddeaae6d2083..90dfdc47ae26 100644
>> --- a/include/linux/of.h
>> +++ b/include/linux/of.h
>> @@ -422,6 +422,11 @@ static inline struct device_node *of_find_node_opts_by_path(const char *path,
>> return NULL;
>> }
>>
>> +static inline struct device_node *of_find_node_by_phandle(phandle handle)
>> +{
>> + return NULL;
>> +}
>> +
>> static inline struct device_node *of_get_parent(const struct device_node *node)
>> {
>> return NULL;
>> --
>> 2.4.1
>>

2015-06-23 15:31:06

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH] of: define of_find_node_by_phandle for !CONFIG_OF

On Thu, Jun 18, 2015 at 12:25 PM, Suman Anna <[email protected]> wrote:
> On 06/17/2015 06:33 PM, Rob Herring wrote:
>> On Wed, Jun 17, 2015 at 11:53 AM, Suman Anna <[email protected]> wrote:
>>> Define stub implementation for of_find_node_by_phandle() API
>>> so that users of this API can build properly even when CONFIG_OF
>>> is not defined.
>>>
>>> Signed-off-by: Suman Anna <[email protected]>
>>
>> Do you have a user for this? If not, apply it when you do.
>
> Yeah, ran into a randconfig build problem on x86 when we tried to add an
> API to remoteproc core [1] that used this function.

Applied adding this info to the commit message. Thanks.

Rob

>
> regards
> Suman
>
> [1] http://marc.info/?l=devicetree&m=143232772426559&w=2
>
>>
>> Acked-by: Rob Herring <[email protected]>
>>
>>> ---
>>> include/linux/of.h | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/include/linux/of.h b/include/linux/of.h
>>> index ddeaae6d2083..90dfdc47ae26 100644
>>> --- a/include/linux/of.h
>>> +++ b/include/linux/of.h
>>> @@ -422,6 +422,11 @@ static inline struct device_node *of_find_node_opts_by_path(const char *path,
>>> return NULL;
>>> }
>>>
>>> +static inline struct device_node *of_find_node_by_phandle(phandle handle)
>>> +{
>>> + return NULL;
>>> +}
>>> +
>>> static inline struct device_node *of_get_parent(const struct device_node *node)
>>> {
>>> return NULL;
>>> --
>>> 2.4.1
>>>
>