Commit 706c0cff authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

media: ipu3-cio2: Proceed with notifier init even if there are no subdevs

The notifier may be registered even if there are no subdevs. Do that to
simplify the code.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent f6a5242b
...@@ -1506,9 +1506,10 @@ static int cio2_notifier_init(struct cio2_device *cio2) ...@@ -1506,9 +1506,10 @@ static int cio2_notifier_init(struct cio2_device *cio2)
if (ret < 0) if (ret < 0)
goto out; goto out;
if (list_empty(&cio2->notifier.asd_list)) /*
return -ENODEV; /* no endpoint */ * Proceed even without sensors connected to allow the device to
* suspend.
*/
cio2->notifier.ops = &cio2_async_ops; cio2->notifier.ops = &cio2_async_ops;
ret = v4l2_async_notifier_register(&cio2->v4l2_dev, &cio2->notifier); ret = v4l2_async_notifier_register(&cio2->v4l2_dev, &cio2->notifier);
if (ret) { if (ret) {
...@@ -1815,8 +1816,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, ...@@ -1815,8 +1816,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
/* Register notifier for subdevices we care */ /* Register notifier for subdevices we care */
r = cio2_notifier_init(cio2); r = cio2_notifier_init(cio2);
/* Proceed without sensors connected to allow the device to suspend. */ if (r)
if (r && r != -ENODEV)
goto fail_cio2_queue_exit; goto fail_cio2_queue_exit;
r = devm_request_irq(&pci_dev->dev, pci_dev->irq, cio2_irq, r = devm_request_irq(&pci_dev->dev, pci_dev->irq, cio2_irq,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment