Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp735932ybe; Wed, 4 Sep 2019 07:03:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHBADzJsYKrggfT4d9E4RoPZubbl+oGNCITl0+tAa5LhQfwCYyM5whXKEmFzvvkr+rans4 X-Received: by 2002:a17:902:a706:: with SMTP id w6mr650375plq.166.1567605822181; Wed, 04 Sep 2019 07:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605822; cv=none; d=google.com; s=arc-20160816; b=cyp5zDwV3neeJLUJ8Cx+hsdu7xadGrpXS0x3K8BEtQrAyNA8JK6ewnUm4vh1ZVXGVZ cRWDrGBm7PEvRMpt/0uumI9TTEttj94epwfeCXoj/htyApMK7hTuWtEG90fwYj87WBDP R4T10oCydbgaz+qTp4UfYGNUFtbxqMeZJj1CvtGpcfmR6Bu8eBgOxd/85/7s3G7SYAFu rzK2XdY1Xo5ovZ/Hi1ctp2yh+lyfEbRktPTFboN7xlIBzrG+0Gz8bQuQhqEg4SUGCilj 2o6rph4zo/fENFRM1rTUBYFWUOL9Xv/8M9KTPioR+lJ2WRiYq9mHu6GxZHMx1O8HK1mu Gixw== 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=nXzbg66MZyEGx/cW1Vt1azJc47etsEOwfLgCbqaHdVU=; b=I06zGxR8ZTngSxaKRiL+HCQsdnWA+ZsubxFVQubCLwcoWVPYgBbVz3NGPDWmHpwLwG hAGtVOzl/ZLE1LwMBw7TeocKGwJ9I7dv5K3ucl48/luKh92NQ5m9ZTcj2slbjDuFG629 a8a6qz9aTKmR7XjtWdGm8Fh6LFddAyU0cFcYozO2f6kuoEpH/haxoz/bE3wxGvTTbSdz YGCflW5R4wDolKrlGnTe98L7H+ZaUj9bpfUf6ucW4C/hNpVNAeyVZX7KMs2q37HNa1dM rLvBflxBRUXUVdfPBzLPwL9CVA3y1FQC6Y3120tOdqJvW+knz4vL7azISoUwiLFUIq2u xbvQ== 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 t9si2416161pjy.47.2019.09.04.07.03.21; Wed, 04 Sep 2019 07:03:42 -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 S1731076AbfIDOBK (ORCPT + 99 others); Wed, 4 Sep 2019 10:01:10 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:51618 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731061AbfIDOBJ (ORCPT ); Wed, 4 Sep 2019 10:01:09 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 65D85D2556F9941EA3F0; Wed, 4 Sep 2019 22:01:07 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 22:00:56 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 30/36] spi: sun6i: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:59:12 +0800 Message-ID: <20190904135918.25352-31-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-sun6i.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 1cf3051..ec7967b 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -435,7 +435,6 @@ static int sun6i_spi_probe(struct platform_device *pdev) { struct spi_master *master; struct sun6i_spi *sspi; - struct resource *res; int ret = 0, irq; master = spi_alloc_master(&pdev->dev, sizeof(struct sun6i_spi)); @@ -447,8 +446,7 @@ static int sun6i_spi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, master); sspi = spi_master_get_devdata(master); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sspi->base_addr = devm_ioremap_resource(&pdev->dev, res); + sspi->base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sspi->base_addr)) { ret = PTR_ERR(sspi->base_addr); goto err_free_master; -- 2.7.4