• Steve Longerbeam's avatar
    media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev · eae2aed1
    Steve Longerbeam authored
    The fwnode endpoint and reference parsing functions in v4l2-fwnode.c
    are modified to make use of v4l2_async_notifier_add_subdev().
    As a result the notifier->subdevs array is no longer allocated or
    re-allocated, and by extension the max_subdevs value is also no
    longer needed.
    
    Callers of the fwnode endpoint and reference parsing functions must now
    first initialize the notifier with a call to v4l2_async_notifier_init().
    This includes the function v4l2_async_register_subdev_sensor_common(),
    and the intel-ipu3, omap3isp, and rcar-vin drivers.
    
    Since the notifier->subdevs array is no longer allocated in the
    fwnode endpoint and reference parsing functions, the callers of
    those functions must never reference that array, since it is now
    NULL. Of the drivers that make use of the fwnode/ref parsing,
    only the intel-ipu3 driver references the ->subdevs[] array,
    (in the notifier completion callback), so that driver has been
    modified to iterate through the notifier->asd_list instead.
    Signed-off-by: default avatarSteve Longerbeam <slongerbeam@gmail.com>
    Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    eae2aed1
v4l2-async.c 18.3 KB