Message ID | 20210419112459.25241-5-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=+ow/=JQ=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA6B2C433B4 for <linux-arm-kernel@archiver.kernel.org>; Mon, 19 Apr 2021 11:27:55 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ACC616108B for <linux-arm-kernel@archiver.kernel.org>; Mon, 19 Apr 2021 11:27:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACC616108B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ALWh4a06NhkL8nAmaPVEHYSCR2z3Nev70lp1+2tOsuQ=; b=eQNIaHXqadFGuP3JeQD3a11wO taap2SlhsXLJVbcCoET01jx9g7A7C+e6Le2ZtswhghAoBhbZA3Q+SfCJ+o6s0ooiB6TBE6nQ93eqN HbTYxg15qOqoAoxRI/TsKjf3Hrinz4uoavxlGC83Vl5StxQtxzA++Iy8ijaObOUIVv5z2BxUVUrcp vPn4KDtOY8k8lPUIS3ytYL8z1vMR1i37gHK4VuZmUX0MPkUdBOq6fnWxM6W71WY1grfMTXDPqKmeG 1Y2gGCq9m17lKgHHoTnmbcPpuX13qAlWPKq6ZlQP0rH/f9BdGqFUBg6KglhYIqPMYhhk39SgbWcHc 48d3sKHEA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYS2a-009lmQ-7p; Mon, 19 Apr 2021 11:26:08 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYS1k-009lWM-J5 for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 11:25:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=BJAoBKFLEPRqk0uaI8YYjk1n4Yp48t5hH+XWP2NP5nI=; b=BidymxEU8FH6svtm0WsbK1sL6F oDMO6/Jh9zhMPz+KRfI+4zug8FcUwtx1hrc0oeAEWv0OereSkIYsCJIezHYn4jr4r4sfFndfEdAAK ltZBbM73wFWy7YEnx3CilSV8fKhQOrfLu0mZNaR9XzNfG+IDw9Cj79fo14DvpkpHpwKsnbA0GESP7 CPLdd+SEL1LLK1uK4WQi8aRloyB6aB8InoZf8VD2QxRuFh0dABnmN6voWAlPEyk5zw+ez8zSsj1YU DGI4kO6t0aIMGtCse1fsA7ydmNNwkUgDkdwMvP2NmBKP34hdvSDZNcMTflSDt+qw9ZX/sihbGf2lS 1VB6QDOQ==; Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYS1i-00BJ01-62 for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 11:25:15 +0000 IronPort-SDR: uO5RUrisuYy1pY+SIDZs8cbTwXeZlYrVBSm4PbRHSpP991VX8yX3GxtrqWmkeOObLyUfiSJtel rjgAZslr09oQ== X-IronPort-AV: E=McAfee;i="6200,9189,9958"; a="194867416" X-IronPort-AV: E=Sophos;i="5.82,234,1613462400"; d="scan'208";a="194867416" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 04:25:06 -0700 IronPort-SDR: Ji0kWO+86DKcA/iebLwOxA9FA1uLhGHlOiR8QcUV7NllFz+EXDF3YSkzS2Hv1PA/7LwwinrkGM t91Cl3TpkWig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,234,1613462400"; d="scan'208";a="454267724" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 19 Apr 2021 04:25:02 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8BE0A1FC; Mon, 19 Apr 2021 14:25:19 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Haibo Chen <haibo.chen@nxp.com>, Fabio Estevam <festevam@gmail.com>, Yangbo Lu <yangbo.lu@nxp.com>, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org Cc: Rob Herring <robh+dt@kernel.org>, Adrian Hunter <adrian.hunter@intel.com>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, NXP Linux Team <linux-imx@nxp.com>, Mark Brown <broonie@kernel.org> Subject: [PATCH v1 5/6] mmc: mmc_spi: Use already parsed IRQ Date: Mon, 19 Apr 2021 14:24:58 +0300 Message-Id: <20210419112459.25241-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210419112459.25241-1-andriy.shevchenko@linux.intel.com> References: <20210419112459.25241-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_042514_258128_1DBFA4F2 X-CRM114-Status: GOOD ( 14.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[v1,1/6] mmc: core: Correct descriptions in mmc_of_parse()
|
expand
|
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index 0b038f5c392a..009c3885f6ba 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c @@ -64,8 +64,8 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) if (mmc_of_parse_voltage(mmc, &oms->pdata.ocr_mask) < 0) goto err_ocr; - oms->detect_irq = irq_of_parse_and_map(np, 0); - if (oms->detect_irq != 0) { + oms->detect_irq = spi->irq; + if (oms->detect_irq > 0) { oms->pdata.init = of_mmc_spi_init; oms->pdata.exit = of_mmc_spi_exit; } else {
SPI core already parses and maps IRQ for us if provided. Use it instead of double parsing in mmc_spi_get_pdata(). Due to above, change condition, since SPI core can hold an error pointer as invalid IRQ. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/mmc/host/of_mmc_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)