[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 27/36] drivers: Add a generic helper to match device by fwnode handle
Hi Rafael

On 04/16/2019 11:20 AM, Rafael J. Wysocki wrote:
> On Mon, Apr 15, 2019 at 6:06 PM Suzuki K Poulose <> wrote:
>> Make the device_fwnode_match() a generic helper to match device
>> by fwnode handle for use with bus_find_device(). This will be
>> also used by coresight.
>> Cc: Greg Kroah-Hartman <>
>> Cc: "Rafael J. Wysocki" <>
>> Signed-off-by: Suzuki K Poulose <>
> Can you resend this with a CC to, please?
> There's some device properties material for 5.2 collected already and
> it would be good to keep all that together.

Sure, will do. Btw, I have a question w.r.t the match function.

We have :

class_find_device(struct class *class, struct device *start,
const void *data,
int (*match)(struct device *, const void *))

bus_find_device(struct bus_type *bus,
struct device *start, void *data,
int (*match)(struct device *dev, void *data))

Just because the "match" has slightly different constraint for the
data (i.e, const void * vs void *), we can't reuse the same match
function for class_find_device. Do you think we should converge the
types to reuse the same match every where (Of course in a separate
patch series) ?


 \ /
  Last update: 2019-04-16 12:32    [W:0.089 / U:7.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site