lkml.org 
[lkml]   [2021]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 12/15] media: v4l2-core: v4l2-async: Check sd->fwnode->secondary in match_fwnode()
    Date
    Where the fwnode graph is comprised of software_nodes, these will be
    assigned as the secondary to dev->fwnode. Check the v4l2_subdev's fwnode
    for a secondary and attempt to match against it during match_fwnode() to
    accommodate that possibility.

    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Daniel Scally <djrscally@gmail.com>
    ---
    Changes in v5:

    - None

    drivers/media/v4l2-core/v4l2-async.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
    index e3ab003a6c85..9dd896d085ec 100644
    --- a/drivers/media/v4l2-core/v4l2-async.c
    +++ b/drivers/media/v4l2-core/v4l2-async.c
    @@ -87,6 +87,14 @@ static bool match_fwnode(struct v4l2_async_notifier *notifier,
    if (sd->fwnode == asd->match.fwnode)
    return true;

    + /*
    + * Check the same situation for any possible secondary assigned to the
    + * subdev's fwnode
    + */
    + if (!IS_ERR_OR_NULL(sd->fwnode->secondary) &&
    + sd->fwnode->secondary == asd->match.fwnode)
    + return true;
    +
    /*
    * 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.
    --
    2.25.1
    \
     
     \ /
      Last update: 2021-01-07 14:33    [W:3.372 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site