media: ipu3-cio2: Request IRQ earlier
[ Upstream commita069f79bfa] Call devm_request_irq() before registering the async notifier, as otherwise it would be possible to use the device before the interrupts could be delivered to the driver. Fixes:c2a6a07afe("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
04e8b87339
commit
da8608cf2e
@@ -1803,11 +1803,6 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
|
||||
|
||||
v4l2_async_notifier_init(&cio2->notifier);
|
||||
|
||||
/* Register notifier for subdevices we care */
|
||||
r = cio2_parse_firmware(cio2);
|
||||
if (r)
|
||||
goto fail_clean_notifier;
|
||||
|
||||
r = devm_request_irq(dev, pci_dev->irq, cio2_irq, IRQF_SHARED,
|
||||
CIO2_NAME, cio2);
|
||||
if (r) {
|
||||
@@ -1815,6 +1810,11 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
|
||||
goto fail_clean_notifier;
|
||||
}
|
||||
|
||||
/* Register notifier for subdevices we care */
|
||||
r = cio2_parse_firmware(cio2);
|
||||
if (r)
|
||||
goto fail_clean_notifier;
|
||||
|
||||
pm_runtime_put_noidle(dev);
|
||||
pm_runtime_allow(dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user