Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp737517ybe; Wed, 4 Sep 2019 07:04:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPIg10tRFLRQVfp4cjhaJ/LCzA4EsOX7f6ZbKhBt/pbEmS7xT6jdFLU+Vis9DbMBPm6Yde X-Received: by 2002:a65:6288:: with SMTP id f8mr34652868pgv.292.1567605885493; Wed, 04 Sep 2019 07:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605885; cv=none; d=google.com; s=arc-20160816; b=E5+jzXzvFher89rJResuwmI6qx36MCwdyT4X8QS2VFZP62CysXj6UmOsJPQx39TPH9 qGUPooVL18DIrrHyww4n1sshelMIm7IKrv15pEMhiL+vK7kaVahZrhm0/bcs9PGE0y6l rqBlClLyLLABkis7CZ8Mig/z7wrqKEO/jdGSwxsFXEbxPPqVCy4Zf6dEhibKULqXHykY lhQRetl2Xr29Z2enqH+9MzKwhHU85ACd/UhNcN+LPo4DjhagGgT99I3PfzymfkUGWYRA A8w/WPssnWNSqEIcdGVETV+OSWPJ+dTYfvxGx7FowKRZSga/CQ0h654kbLpmI1JYWHmL hR9g== 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=Z+R7Hx8XmG/jFH6i9DpVyGA2LUyRUkCxJgx74WLkTiM=; b=X7pjKpbEzzQqouurjpJJE+iqpdVZX17KB98kcJH1HqRuU5QlPQewQgg2itPowVd+GZ W68VemPPhjIC6QXxmoHLFdCBwCr4WOxFAt2HNWVwkbABaS0Xv7mxZu6bjvYcOnJMPvQK IMKjMCMA44eFPapiHbzyZS0pe73vMHuVkrsogUgdhUMh4paFR9yePPEp4IGauZ/1WOAi Ym4F249MceqfqhJova5/CSVJa/2Nqb9Szrq1P480KLvASZDzYeom4oCTUvMu9KZkkqHb 42b7xhhpM5Ymt/IjFrfqT2p+10XAPOqoh+0lToF0V6mWDA/Y5IzV0eMgA5j0h5dyeaC5 V7ow== 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 j8si17376594pgm.166.2019.09.04.07.04.24; Wed, 04 Sep 2019 07:04:45 -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 S1730832AbfIDOA3 (ORCPT + 99 others); Wed, 4 Sep 2019 10:00:29 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6202 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730801AbfIDOAZ (ORCPT ); Wed, 4 Sep 2019 10:00:25 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D4191445C12FDC6D27F1; Wed, 4 Sep 2019 22:00:22 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 22:00:15 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 16/36] spi: spi-meson-spifc: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:58:58 +0800 Message-ID: <20190904135918.25352-17-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-meson-spifc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c index f7fe9b1..c7b0399 100644 --- a/drivers/spi/spi-meson-spifc.c +++ b/drivers/spi/spi-meson-spifc.c @@ -286,7 +286,6 @@ static int meson_spifc_probe(struct platform_device *pdev) { struct spi_master *master; struct meson_spifc *spifc; - struct resource *res; void __iomem *base; unsigned int rate; int ret = 0; @@ -300,8 +299,7 @@ static int meson_spifc_probe(struct platform_device *pdev) spifc = spi_master_get_devdata(master); spifc->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(spifc->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { ret = PTR_ERR(base); goto out_err; -- 2.7.4