diff options
Diffstat (limited to 'drivers/media/platform/atmel/atmel-isc.c')
-rw-r--r-- | drivers/media/platform/atmel/atmel-isc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index dc637bffe63c..334de0f2e36a 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -1983,8 +1983,10 @@ static void isc_subdev_cleanup(struct isc_device *isc) { struct isc_subdev_entity *subdev_entity; - list_for_each_entry(subdev_entity, &isc->subdev_entities, list) + list_for_each_entry(subdev_entity, &isc->subdev_entities, list) { v4l2_async_notifier_unregister(&subdev_entity->notifier); + v4l2_async_notifier_cleanup(&subdev_entity->notifier); + } INIT_LIST_HEAD(&isc->subdev_entities); } @@ -2201,8 +2203,15 @@ static int atmel_isc_probe(struct platform_device *pdev) } list_for_each_entry(subdev_entity, &isc->subdev_entities, list) { - subdev_entity->notifier.subdevs = &subdev_entity->asd; - subdev_entity->notifier.num_subdevs = 1; + v4l2_async_notifier_init(&subdev_entity->notifier); + + ret = v4l2_async_notifier_add_subdev(&subdev_entity->notifier, + subdev_entity->asd); + if (ret) { + fwnode_handle_put(subdev_entity->asd->match.fwnode); + goto cleanup_subdev; + } + subdev_entity->notifier.ops = &isc_async_ops; ret = v4l2_async_notifier_register(&isc->v4l2_dev, |