Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp888648ybg; Fri, 18 Oct 2019 08:50:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy90NHw5BA0c4agmXjdp3bf9+6wzrPIgIgou8fMhqlzaoAGiX36BhyQe4SFxHzi83S/Wg+K X-Received: by 2002:a50:f10a:: with SMTP id w10mr10354368edl.247.1571413834196; Fri, 18 Oct 2019 08:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413834; cv=none; d=google.com; s=arc-20160816; b=0YGSoRXZSZz16TdKL/lwZM+O6B6MvlldPkE5ra0qugBiTJwAOXp5/RJ3GVFq2yWEKT vEYue4PYBMS0N9xN3TUVhkpw15vn2780C7XhX9KK23jnI3hNahEiQovJqfkyQvfn0L9g 9I4TAnIQr+x6KdpDaCmo/8wik/+7pxfyntVF03PInDx5RgTaSQk/PwnHZZYYh46ZDhjK NKOx7ZiwwyE68SGWcYKRwkUH0YdjpiYYO9BMKj7Q1Bvje3/HuP4/9gYFD8DyKetdLt40 C/CGAHaIS1Btrmqu92sekzcV60aQEfpUvcR7CG+eBQDhHLv29GlKCE7dvu1rp1hHIWQL 5lig== 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=3/D0pxDtMcGR+/eTw18bmI0qFqv8p11d2XEcFwRFByA=; b=S1SdhTw7yr7ZCAiuVFoen3yIOQjYpgnYgQ/soLxXpWl3HyEIdmuTJyi9gP66lL0Fqr FN9LURNcMURvhuwIes2ZeCKjxmr25kXQLgkgRAXUF5qkm2g2Op4BJrfJ5mdOuYaZdnIk 2DqMm3CwcQpUkUMGZQXP7cVP4jhR7GC47koOLFqoOfXiOQXqaX0oKn4iHQ2guEoyh5bA gdR5PfvtJNi+S0APxoBOnpmmAtIwQLjS64xxh3lZm4f1zmVfMuGIRb584LRUZKPu5ejO t4eEznl48jBqf4vFMSRbLTCGjPi6Nv2pIoLwQkKN9590PzbsZy93mVm+tcUXJ1gAdz24 wL1Q== 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 u21si3648468ejt.345.2019.10.18.08.50.11; Fri, 18 Oct 2019 08:50:34 -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 S2389098AbfJQMtV (ORCPT + 99 others); Thu, 17 Oct 2019 08:49:21 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57498 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2502793AbfJQMtQ (ORCPT ); Thu, 17 Oct 2019 08:49:16 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C8110B962874AFB30720; Thu, 17 Oct 2019 20:49:13 +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; Thu, 17 Oct 2019 20:49:03 +0800 From: YueHaibing To: , , , , , , , , , , , , CC: , , , , , , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 25/30] pinctrl: coh901: use devm_platform_ioremap_resource() to simplify code Date: Thu, 17 Oct 2019 20:26:35 +0800 Message-ID: <20191017122640.22976-26-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20191017122640.22976-1-yuehaibing@huawei.com> References: <20191017122640.22976-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. Signed-off-by: YueHaibing --- drivers/pinctrl/pinctrl-coh901.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index 063a629..2905348 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c @@ -615,7 +615,6 @@ static struct coh901_pinpair coh901_pintable[] = { static int __init u300_gpio_probe(struct platform_device *pdev) { struct u300_gpio *gpio; - struct resource *memres; struct gpio_irq_chip *girq; int err = 0; int portno; @@ -633,8 +632,7 @@ static int __init u300_gpio_probe(struct platform_device *pdev) gpio->chip.base = 0; gpio->dev = &pdev->dev; - memres = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gpio->base = devm_ioremap_resource(&pdev->dev, memres); + gpio->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gpio->base)) return PTR_ERR(gpio->base); -- 2.7.4