Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp737156ybe; Wed, 4 Sep 2019 07:04:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3+lmX8I3Q74+PwlhWChUrkqVVdGlsxMLxG+omweC7QsbpfmeP0zwpVNBkrFZrpR7eFleU X-Received: by 2002:a63:58c:: with SMTP id 134mr8291657pgf.106.1567605871001; Wed, 04 Sep 2019 07:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605870; cv=none; d=google.com; s=arc-20160816; b=w0aygO0Xu8isYO7xqXynpp0zZ3yDOKdd+KZWL0tJu1E4dGPCp2wN5lClqtyR02IB6q UPhqYJ9M9dTekmfoR4LIH2bijjf6qrQnpKe7KGmSv8kFl4UguYbhGRXemxBSvq5J7tvL ovvTB7n8TDFl+Ya19p1BcupPoLbv6V8QxZL/y6w8acElHHXflgxPLHjBM8gci3X0EbjZ OHjR1P6nigJoCWCJ7Re2xMkAmGQGNXjyKNAIA7HuaVbuMvCRyuO+Wikd7MvmukqH92cT d+HWZ8+PfSRps0z4VSJG0IQ3YUE9F9pR+yw0MQ9PERxtg7NWRoOfyS2DmULJjpmC3ZB1 Js0A== 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=vDTOy1HTHcYoSSXgcShsB+dQLn7DMI7dU9gBfixt0Oo=; b=JwBsyFJEaHzJ7Ab5WbLju77YIsJwGknUKJWd65oaUeZqyp6/hZDgP8j5XdaKy7M2cr 2VUB7L8aD7DYVi7hTg3s3QMIaB0Y0Ye9C+pbZ3LZ+7lGUltArdukuqxZFEjW3Gf/4uaC UVnKvZVXE2vFMf1nKPy5HL44HnbH4yA9Kl/LacHL7KE011g6SVuwkYZZ4zTYqK50b8rL fpVkcGIr54sb0RyUJbLmyIDf/KCmbj6Hvly6gvE+AAUEcdsdZ9OEIU+P5un5kYBQow9F e6btUHZUQr5KGwSGM2GQyLoDIHqFSmppqiJTQ1+PWHC7e9CvvAtxjDuCzBEO+nNwXHYL UxUg== 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 t18si2299271pjr.102.2019.09.04.07.04.10; Wed, 04 Sep 2019 07:04:30 -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 S1730790AbfIDOCQ (ORCPT + 99 others); Wed, 4 Sep 2019 10:02:16 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6656 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730330AbfIDOAm (ORCPT ); Wed, 4 Sep 2019 10:00:42 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1D921DA8F8A009239BCC; Wed, 4 Sep 2019 22:00:33 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 22:00:24 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 19/36] spi: npcm: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:59:01 +0800 Message-ID: <20190904135918.25352-20-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-npcm-pspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-npcm-pspi.c b/drivers/spi/spi-npcm-pspi.c index 5c56cae..b191d57 100644 --- a/drivers/spi/spi-npcm-pspi.c +++ b/drivers/spi/spi-npcm-pspi.c @@ -341,7 +341,6 @@ static int npcm_pspi_probe(struct platform_device *pdev) { struct npcm_pspi *priv; struct spi_master *master; - struct resource *res; unsigned long clk_hz; struct device_node *np = pdev->dev.of_node; int num_cs, i; @@ -368,8 +367,7 @@ static int npcm_pspi_probe(struct platform_device *pdev) priv->is_save_param = false; priv->id = pdev->id; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) { ret = PTR_ERR(priv->base); goto out_master_put; -- 2.7.4