lkml.org 
[lkml]   [2019]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 06/28] drivers: Add generic helper to match by of_node
From
Date
Hi

On 14/06/2019 21:31, Wolfram Sang wrote:
>> +
>> +int device_match_of_node(struct device *dev, const void *np)
>> +{
>> + return dev->of_node == np;
>> +}
>> +EXPORT_SYMBOL_GPL(device_match_of_node);
>
> Is it an option to 'static inline' this simple function in the header,
> saving the EXPORT?
>

No. This is supposed to be passed on as a call back function pointer
for the APIs. Having it as a static inline, would simply replicate
the same function through the driver subsystems, which is one of the
issues that series is trying to solve. Also, by having them exported,
we can convert the new specialized device lookup functions,
*_find_device_by_<property> to be static inlines.

Suzuki

\
 
 \ /
  Last update: 2019-06-17 12:00    [W:0.044 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site