From patchwork Fri Sep 2 23:26:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101880 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp1123347qga; Fri, 2 Sep 2016 16:26:49 -0700 (PDT) X-Received: by 10.98.65.139 with SMTP id g11mr40992585pfd.140.1472858809150; Fri, 02 Sep 2016 16:26:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gg3si13782868pac.136.2016.09.02.16.26.49; Fri, 02 Sep 2016 16:26:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbcIBX0r (ORCPT + 1 other); Fri, 2 Sep 2016 19:26:47 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:51801 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752666AbcIBX0q (ORCPT ); Fri, 2 Sep 2016 19:26:46 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MYvrP-1bbPQS1tZb-00Vgqu; Sat, 03 Sep 2016 01:26:31 +0200 From: Arnd Bergmann To: Herbert Xu Cc: Romain Perier , Boris Brezillon , Arnaud Ebalard , Thomas Petazzoni , Arnd Bergmann , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: mv_cesa: remove NO_IRQ reference Date: Sat, 3 Sep 2016 01:26:40 +0200 Message-Id: <20160902232648.2119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ender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Drivers should not use NO_IRQ, as we are trying to get rid of that. In this case, the call to irq_of_parse_and_map() is both wrong (as it returns '0' on failure, not NO_IRQ) and unnecessary (as platform_get_irq() does the same thing) This removes the call to irq_of_parse_and_map() and checks for the error code correctly. Signed-off-by: Arnd Bergmann --- drivers/crypto/mv_cesa.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) It would be good if someone could test this on a machine that boots from DT to ensure the conversion was correct. -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index e6b658faef63..104e9ce9400a 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c @@ -1091,11 +1091,8 @@ static int mv_probe(struct platform_device *pdev) cp->max_req_size = cp->sram_size - SRAM_CFG_SPACE; - if (pdev->dev.of_node) - irq = irq_of_parse_and_map(pdev->dev.of_node, 0); - else - irq = platform_get_irq(pdev, 0); - if (irq < 0 || irq == NO_IRQ) { + irq = platform_get_irq(pdev, 0); + if (irq < 0) { ret = irq; goto err; }