Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp733998ybe; Wed, 4 Sep 2019 07:02:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9OtyXIE9P98oinjObVb4pMwqvoj2FPzw7g7DlO46bwXWLXwYExix97UfFRHCHtI/qxvS4 X-Received: by 2002:a17:90a:fd8c:: with SMTP id cx12mr5166853pjb.95.1567605751458; Wed, 04 Sep 2019 07:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605751; cv=none; d=google.com; s=arc-20160816; b=OQYyB3mvGJjeCEdqmEnZX92F6tT3c5dwLJ5kMzZUSOLvdLwezLXnBlA4QnBNf0ikWP YEwN0YPeAIcWPsP0CnIPCXOt1IOMGJzTAzy/4LgljwO2hLCx6+Qv8Ed0ibZ1OcmSYp2k bCIoN+xCs7Nffr6UfiaslSffXxmpVnS/5uxFEeUZ+QpIQLRfDoSp1H0/kWrUp2QVpdDS w1xbQr/U8spDqBsxejz72Vx8uQruGAPOpHp5dtlPACITgtfkwnkF2zT+6Gi707X0R9MC fHnaw4DwegTCH6Yp4WMZC3t1ozZDLlTODC3yPq2hkpQ98DYsCofW7tSNx3zG9Sh5w8Lc NoaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=KsnDwZ5btXVgqSLVIAV1Y6D0i+mfhhNHE6W8q83Jeq0=; b=eYS3OJjbXugSgDgi+0zSXysvyD7ie2gNtyRwWjoyk0Dpf1odUmxUrVBhOEqsoOQnLW eF1RRZbem8XEgRFv+qS2qKY0Rmhc8lnChY8dYlUskkYvg30Ol5yvLwlZYXx1vcc39LUg dbp25XryLlcAfr7OLInGzfljFbuIh0JmAKmGlgdjL1oVseF+eu43HCH9nuwedJEm1gwZ b20KRFnS8H61Kcd50d6BJIuhzjHltrrO48IuNSsic3AmpyIR2027vFFlwrtl8T2gzv2Q jf9FeMvly7QoCxF18t75I8UPG8Q73F2qFW6GvXbehm2LzHmOi1ALaxDLwsOjWSt7tFHu ESWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si16839694pgs.529.2019.09.04.07.02.14; Wed, 04 Sep 2019 07:02:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730883AbfIDOAk (ORCPT + 99 others); Wed, 4 Sep 2019 10:00:40 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:53608 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730473AbfIDOAi (ORCPT ); Wed, 4 Sep 2019 10:00:38 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6DEEA87C3895A6B5B070; Wed, 4 Sep 2019 22:00:35 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 22:00:27 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 20/36] spi: nuc900: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:59:02 +0800 Message-ID: <20190904135918.25352-21-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190904135918.25352-1-yuehaibing@huawei.com> References: <20190904135918.25352-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/spi/spi-nuc900.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index f65a029e..6140035 100644 --- a/drivers/spi/spi-nuc900.c +++ b/drivers/spi/spi-nuc900.c @@ -327,7 +327,6 @@ static int nuc900_spi_probe(struct platform_device *pdev) { struct nuc900_spi *hw; struct spi_master *master; - struct resource *res; int err = 0; master = spi_alloc_master(&pdev->dev, sizeof(struct nuc900_spi)); @@ -358,8 +357,7 @@ static int nuc900_spi_probe(struct platform_device *pdev) hw->bitbang.chipselect = nuc900_spi_chipsel; hw->bitbang.txrx_bufs = nuc900_spi_txrx; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hw->regs = devm_ioremap_resource(&pdev->dev, res); + hw->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hw->regs)) { err = PTR_ERR(hw->regs); goto err_pdata; -- 2.7.4