Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp738163ybe; Wed, 4 Sep 2019 07:05:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDRFTnT04hyl1ELCwKy4TPzvvxYRWZh8rypR+jENeKbWqPeukMIoRCjnzGg9Sm1ky4sZfC X-Received: by 2002:aa7:8a4e:: with SMTP id n14mr19998727pfa.170.1567605913692; Wed, 04 Sep 2019 07:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605913; cv=none; d=google.com; s=arc-20160816; b=krJfKMj1kkAbA1Qz0kjRZ8Tj08BU9Bwbni6pLzzB7MgoS3QYXZCBGZdE9OSSaeqcoL f4kTSMUL315dxBLc/QKgHY4yKAgvc/lzpmDhKpFYvjwqlHXW7iBWfSPrRQShYmiZYgkz mq7jqXXWsRpUsmpM7UDs0u65lR2LaistWVyEPG4Xitu9zEoZHzw3RwepfvWCYqJgpPVN 6SfALFWtwpCKBs4P+wO430v/mAuzhYdnqTqVhCUGaajiIaFJD7qd7Q+RZMjTcwbMnTQg in30WvVNBq9F6sHmuiyJQsmcl85tP+7rszoBLtxclQNfXIG1EJZG3/qBVewm3h28m1zJ XVUw== 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=88nI0tn8UhuLbwSrL/jeRnDwpUSkZIz9cRC8yGvn0rk=; b=cWHLje4294eZcKrcVjLXXUkE9v4zvR532j8B04u2d0kKurRgrBXr63pIBXUZEVY/c1 lnYxz5lGWcgxslbyuHXzdaVlKJA2MIEBnqsTFoKlzdeo7SzEMi8/jGtf/PPqT1681QuN e2DtFipCjRj6TTK6PL90YhrFzYus4GJ2d3wUbu05Sc6Y+jA39pxvZKsaweus9N89SJdm eoC7V6zZeZgShmzd447+imj68Y+PHJmhRO8/IFyWQJlu/f79djicIGgDSc6kLgbHoSqC b2XCHIlmntqidM/v6uE2Gsby6F4EEWhEhh/OXCyQAzmEgb+IYZaJ26SxK5O+aGfjXZvT H+Eg== 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 n16si20418887pff.23.2019.09.04.07.04.51; Wed, 04 Sep 2019 07:05:13 -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 S1731193AbfIDOBk (ORCPT + 99 others); Wed, 4 Sep 2019 10:01:40 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6661 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729677AbfIDOBY (ORCPT ); Wed, 4 Sep 2019 10:01:24 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2437272283B48D87E014; Wed, 4 Sep 2019 22:01:19 +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:01:11 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 35/36] spi: zynq-qspi: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:59:17 +0800 Message-ID: <20190904135918.25352-36-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-zynq-qspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c index 4a5326c..5cf6993 100644 --- a/drivers/spi/spi-zynq-qspi.c +++ b/drivers/spi/spi-zynq-qspi.c @@ -620,7 +620,6 @@ static int zynq_qspi_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct zynq_qspi *xqspi; - struct resource *res; u32 num_cs; ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi)); @@ -630,8 +629,7 @@ static int zynq_qspi_probe(struct platform_device *pdev) xqspi = spi_controller_get_devdata(ctlr); xqspi->dev = dev; platform_set_drvdata(pdev, xqspi); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - xqspi->regs = devm_ioremap_resource(&pdev->dev, res); + xqspi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(xqspi->regs)) { ret = PTR_ERR(xqspi->regs); goto remove_master; -- 2.7.4