Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795049375; b=2UI7OLBuPcPdueWMstT8a+KQdnW3GmwreVK6ZTM7+nf4UmLzqZIocAb8cFDIkgJjzONq B3sF3n1CAd1d0yteTphN8TxNRamAwa2rvtGuZLOKnK6BiQh0StyHrY4N7nMTiyek1Qd25 6JPF7Od46So1HWdP+M9RHqygRWTNLw7lgWfT+LTPjTSAsb/g8GUVvc94fsZt1dwbCTk61 2J4TjiVeOossYQCY++7LR7BfBa9qHGLudZXIsblRHzHRNGZYIOiihwcRwWKLDiVl4Fb13 ifZI2MNqpWgbzmkXmH0iVBM40JeOm6UgRmP2C7FBGGCtydN88yPRm3VuHQsKDR3rcYw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795049375; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=pTuOf0sVeSoYGCtjSpKjyt59c8fdy9Tn1R4oj6PoHIQ=; b=5m1TST5KhKArPItJprVrf3HzAV7hOJF17UReyxi6dQA0/qdiLsVjSyNUiTbi479Apnu8 +HjvsB7KTyGfErt20bqDwrPup1YnXkzqznWtZWPb4xl3tVI5vDyWznEoT8Vuyr6S0jTLS V65fNiVz1q2XzHM1PU1AZSDxURp8+Za4UZqx/ACcR2u9Grpt8gB937WVF0qguTNWEQriz XGMDoxvu4jLN1KxYBWtGkPjdqw8aoM3VSmxJ+OExPLd6YgNIRpOmslFiMhNug9FjLBbGK 3FXcWirU9pcpCKwwWkou9L/ocUJ5pB1+PMGMKeOVPcAjz00ZxyAFNleimiZLFZ6Q9Sw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XJ4M4dkG; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C089606A31C; Thu, 19 Nov 2026 00:49:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XJ4M4dkG Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60EB21F000C4; Thu, 19 Nov 2026 00:49:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795049374; bh=pTuOf0sVeSoYGCtjSpKjyt59c8fdy9Tn1R4oj6PoHIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XJ4M4dkG2WzVjM3gljyNKVJvrv8qA+TlNI6tX3k+GOoD4BS/NV24FJ47owHpYg26O uxwWp8F2fqD3+/JZDsOtYp1UXA3HXRMypOpKeiLoYukTu1Q7hSOYp7ThGLa/CkzgA9 w7n4enbDXt+xqQM/hPnsaZ/uNuo72vHaMYdSVeoU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rosen Penev , Herbert Xu , Sasha Levin Subject: [PATCH 6.1 2330/2857] crypto: talitos - Use platform_get_irq() to retrieve interrupt Date: Wed, 18 Nov 2026 15:56:04 +0100 Message-ID: <20261118150325.429915217@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150201.293410965@linuxfoundation.org> References: <20261118150201.293410965@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rosen Penev [ Upstream commit 4a1c7518cc31430b96458202b6a5b4064ff0cfa0 ] Remove the need to call irq_dispose_mapping as needed by irq_of_parse_and_map(). Simplify the function as a result. No need for gotos anymore. Add a missing free_irq. Signed-off-by: Rosen Penev Signed-off-by: Herbert Xu Stable-dep-of: 666d66df2525 ("crypto: talitos - init tasklets before requesting IRQs") Signed-off-by: Sasha Levin --- drivers/crypto/talitos.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 5a4f2322b183e..096e5edc0b3b0 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -192,7 +192,7 @@ static int reset_device(struct device *dev) && --timeout) cpu_relax(); - if (priv->irq[1]) { + if (priv->irq[1] > 0) { mcr = TALITOS_MCR_RCA1 | TALITOS_MCR_RCA3; setbits32(priv->reg + TALITOS_MCR, mcr); } @@ -3253,13 +3253,11 @@ static int talitos_remove(struct platform_device *ofdev) talitos_unregister_rng(dev); for (i = 0; i < 2; i++) - if (priv->irq[i]) { + if (priv->irq[i] > 0) free_irq(priv->irq[i], dev); - irq_dispose_mapping(priv->irq[i]); - } tasklet_kill(&priv->done_task[0]); - if (priv->irq[1]) + if (priv->irq[1] > 0) tasklet_kill(&priv->done_task[1]); return 0; @@ -3365,26 +3363,26 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, static int talitos_probe_irq(struct platform_device *ofdev) { struct device *dev = &ofdev->dev; - struct device_node *np = ofdev->dev.of_node; struct talitos_private *priv = dev_get_drvdata(dev); int err; bool is_sec1 = has_ftr_sec1(priv); - priv->irq[0] = irq_of_parse_and_map(np, 0); - if (!priv->irq[0]) { - dev_err(dev, "failed to map irq\n"); - return -EINVAL; - } + priv->irq[0] = platform_get_irq(ofdev, 0); + if (priv->irq[0] < 0) + return priv->irq[0]; + if (is_sec1) { err = request_irq(priv->irq[0], talitos1_interrupt_4ch, 0, dev_driver_string(dev), dev); goto primary_out; } - priv->irq[1] = irq_of_parse_and_map(np, 1); + priv->irq[1] = platform_get_irq_optional(ofdev, 1); + if (priv->irq[1] == -EPROBE_DEFER) + return priv->irq[1]; /* get the primary irq line */ - if (!priv->irq[1]) { + if (priv->irq[1] < 0) { err = request_irq(priv->irq[0], talitos2_interrupt_4ch, 0, dev_driver_string(dev), dev); goto primary_out; @@ -3400,7 +3398,6 @@ static int talitos_probe_irq(struct platform_device *ofdev) dev_driver_string(dev), dev); if (err) { dev_err(dev, "failed to request secondary irq\n"); - irq_dispose_mapping(priv->irq[1]); priv->irq[1] = 0; } @@ -3409,7 +3406,6 @@ static int talitos_probe_irq(struct platform_device *ofdev) primary_out: if (err) { dev_err(dev, "failed to request primary irq\n"); - irq_dispose_mapping(priv->irq[0]); priv->irq[0] = 0; } @@ -3510,7 +3506,7 @@ static int talitos_probe(struct platform_device *ofdev) tasklet_init(&priv->done_task[0], talitos1_done_4ch, (unsigned long)dev); } else { - if (priv->irq[1]) { + if (priv->irq[1] > 0) { tasklet_init(&priv->done_task[0], talitos2_done_ch0_2, (unsigned long)dev); tasklet_init(&priv->done_task[1], talitos2_done_ch1_3, @@ -3528,7 +3524,7 @@ static int talitos_probe(struct platform_device *ofdev) for (i = 0; i < priv->num_channels; i++) { priv->chan[i].reg = priv->reg + stride * (i + 1); - if (!priv->irq[1] || !(i & 1)) + if (priv->irq[1] < 0 || !(i & 1)) priv->chan[i].reg += TALITOS_CH_BASE_OFFSET; spin_lock_init(&priv->chan[i].head_lock); -- 2.53.0