Hi Laurent, On 18/03/2020 00:25, Laurent Pinchart wrote: > Use the presence of a "remote-endpoint" property to detect if a fwnode > is an endpoint node, as checking the node name won't work on ACPI-based > implementations. Technically, won't this property only detect that the endpoint is connected to another endpoint, and 'un-connected' endpoints wont' match? Of course in this instance - an unconnected endpoint is likely not much use and probably even shouldn't match ;-) ~(but it may still 'be' an endpoint). Also - would this patch be squashed into 1/4? I'll leave it to Sakari to comment on the actual validity of this approach all the same :-) -- Kieran > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx> > --- > drivers/media/v4l2-core/v4l2-async.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c > index 9f393a7be455..a5f83ba502df 100644 > --- a/drivers/media/v4l2-core/v4l2-async.c > +++ b/drivers/media/v4l2-core/v4l2-async.c > @@ -78,7 +78,6 @@ static bool match_fwnode(struct v4l2_async_notifier *notifier, > bool asd_fwnode_is_ep; > bool sd_fwnode_is_ep; > struct device *dev; > - const char *name; > > /* > * Both the subdev and the async subdev can provide either an endpoint > @@ -92,10 +91,10 @@ static bool match_fwnode(struct v4l2_async_notifier *notifier, > * Otherwise, check if the sd fwnode and the asd fwnode refer to an > * endpoint or a device. If they're of the same type, there's no match. > */ > - name = fwnode_get_name(sd->fwnode); > - sd_fwnode_is_ep = name && strstarts(name, "endpoint"); > - name = fwnode_get_name(asd->match.fwnode); > - asd_fwnode_is_ep = name && strstarts(name, "endpoint"); > + sd_fwnode_is_ep = fwnode_property_present(sd->fwnode, > + "remote-endpoint"); > + asd_fwnode_is_ep = fwnode_property_present(asd->match.fwnode, > + "remote-endpoint"); > > if (sd_fwnode_is_ep == asd_fwnode_is_ep) > return false; >