From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAE3A262BE; Mon, 27 May 2024 19:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716838514; cv=none; b=P3T58cFgsZY4MEFnbp6APiacxPpRCHzfjnnfjEYno3qU7KKYEsmjWli4Rd2clkMPZlSK2kz4FLcVj1FIM5rmbfhCpTxa9s86WcPaehIZq/fUi4PisSMKL1DEZUzz17qONSrfxTafhxRG2yqYaDDfAovXglvpQocozdve6tOrp+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716838514; c=relaxed/simple; bh=rfE8ZWeXijTcLXAFjXEN4Q0OvH20RfNplIKEJansCbo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=brL55nUGwYkymtyRQRpljtq8Y1Pi9qojhQhpEhAkIlNJpK3vZiCqWOACT1Wqg7LCJhmkIM3P4+EDaybNa3MZextEFeUmSpe8lej8YmAeGb1TLnlSpjFEFkb57sVYjLkkUE0RYiRZJF4Q6RrPBXQcg5q4908uzJkL9iuPfW2+KFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ThoDXoLc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ThoDXoLc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EF40C2BBFC; Mon, 27 May 2024 19:35:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716838513; bh=rfE8ZWeXijTcLXAFjXEN4Q0OvH20RfNplIKEJansCbo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ThoDXoLcAlpTiisjz0lMzKydurrPe4EVbVNf30B+H7qqpMbUB6GrHi3ztMLLTrfZg NC71azLbw0zmU2VwW1mxql3rQCh5XS01A5Y9O7kOmQnJ2nIncInnDsEJGA7AZ4zID1 hcV6WeF4wUFwj4w0TB76bYtAj4ZPslASTcEzaF30= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sakari Ailus , Hans Verkuil , Sasha Levin Subject: [PATCH 6.8 395/493] media: ipu3-cio2: Request IRQ earlier Date: Mon, 27 May 2024 20:56:37 +0200 Message-ID: <20240527185643.193723942@linuxfoundation.org> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240527185626.546110716@linuxfoundation.org> References: <20240527185626.546110716@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sakari Ailus [ Upstream commit a069f79bfa6ec1ea0744981ea8425c8a25322579 ] 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: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index ed08bf4178f08..d5478779b3103 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -1789,11 +1789,6 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, v4l2_async_nf_init(&cio2->notifier, &cio2->v4l2_dev); - /* 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) { @@ -1801,6 +1796,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); -- 2.43.0