Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp737429ybe; Wed, 4 Sep 2019 07:04:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuNC0W1/VlAUKH/EIkrztn7/bP3x02Hh1OrS3qo6xeJZRp0k6kGTvr54RsbkYbtEU0IIgG X-Received: by 2002:a63:9e54:: with SMTP id r20mr36388862pgo.64.1567605881707; Wed, 04 Sep 2019 07:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605881; cv=none; d=google.com; s=arc-20160816; b=aIXOM/XAy6rvCwwW5I/n3s4q4cbuYsrI4EJqTzxog/+/64yPTkQzNaKN71ur3lzfyC uUHj1zHi6eSwodsdcv0IP9DjS1gigG7Tzu05/XHMIrL/V1CAnLlgSBuJ3U7BRvazxYhU oxk0N8gPYm33a/mObw0AthuQ+39E8elkVWO8lTBNrgI07ihMJTEEHYTHlDNrDm+T+DyZ ++DmrY7V/35IxNh1l4NS6oKwLvaKIIxsL9sIzfRyjv4KGOeTDggZNrwImZmMvr/L/TqX 4gnLk+EgeKgYHcxmz6PxmhQrEh1fo5BqAXiIVjda1OVLhzz+qxezWSUvtDxJahdCa/xW oIiQ== 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=8OzoQ3ly/z4ufSewjJi36veuQI+0d3adlQmJx2attco=; b=SgfjBOaYqkQYHD3CJpJUXd3J01vkrqBSrIVQObBtfeoRhkZKNaJ1/ezOL1o3sUnU51 O0lcA2TT7QSYnNK4YM9umsYldwqcCFchjjF7DOpKnqAbHTMpyZJMDUfyxCL5pCpyFqt3 1kITTLgkMskr6yyHrDUAYnxxinQUYfj2XBx1ODYp2XKqgmVmCbCiDb+65u/PjVUNAaUO qf8q7lgIeLj5VQrXu5y4dZS9OIMFQnRjEUZDlr6n2gJldot8DCAGwt1uNRdI+7HaF+r6 IqWqztn99S+3vcx3I5TU1t5F1X0jc2DSelxE2EDRB/GjYF171qBZAVyAWNKwTPfBdMWW ImXQ== 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 j20si19377835pfr.101.2019.09.04.07.04.21; Wed, 04 Sep 2019 07:04:41 -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 S1731005AbfIDOA5 (ORCPT + 99 others); Wed, 4 Sep 2019 10:00:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6658 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730405AbfIDOA4 (ORCPT ); Wed, 4 Sep 2019 10:00:56 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 645B84E991920E3282CB; Wed, 4 Sep 2019 22:00:48 +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:41 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:59:07 +0800 Message-ID: <20190904135918.25352-26-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-s3c24xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index aea8fd9..2d6e37f 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c @@ -487,7 +487,6 @@ static int s3c24xx_spi_probe(struct platform_device *pdev) struct s3c2410_spi_info *pdata; struct s3c24xx_spi *hw; struct spi_master *master; - struct resource *res; int err = 0; master = spi_alloc_master(&pdev->dev, sizeof(struct s3c24xx_spi)); @@ -536,8 +535,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev) dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang); /* find and map our resources */ - 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_no_pdata; -- 2.7.4