Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7284970ybp; Wed, 16 Oct 2019 06:37:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8kkrmX9N+2RHkgGNceFdoy6PDaQ8VOOusTvtP3GO8IfAL5x3Ns8Lf00eFmw/8wdXkuYbz X-Received: by 2002:a05:6402:323:: with SMTP id q3mr12636857edw.166.1571233021792; Wed, 16 Oct 2019 06:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571233021; cv=none; d=google.com; s=arc-20160816; b=ZAwynk09LtzaTwqcBQvPkpdwKT6i/BbPFdtEGVeqtYVU2Tq+IxVW9sLx8BmN3xm8z0 b2cMlkFI9D2+Zsnfe71oVGo8M8d2G9szXk2tzYF07KpfdOCLXnEmhlL0x2lWIrmC2nrs 4qzCs5TwflEUke3eGc8603ICErYridBECoU/NzPTgbNQjmvMP4hZ3Ayc3a6SWUEQjrn1 b38Doa7WX+BXlWmP5COtvqEXZZVPe8cokzxdniUUE9lIaAmEDk7WOs/iMKlQpX0v3gHR tNhsKPiSjhY1Py+yRUW/MLPIyauV/G3OGRA2OwSke70CSoYydP6p7QvXUOmpwksS6TIe VcXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=6FgzNkOyGA8kpuJJV/keghTeRo4pEK1O9EHxPnQ12+w=; b=cdRvJcYz77C4YUiL5c5WFhXK0wHlAsY0vCNzVvvkW1KqKOBixRw+sJO3bnVmBLSjDv mrf2Vans0KbmXGrwkf1s318GIvmw+ZZ4mW4PFltAmyA5XEX49VtldkIe0GYK0Hbk72RQ Rq6NXMu4W/D7llqEssSkiupXggiemKZV3rBD8+NAoeJetUGh6sLmeyIA/Y5qlPztQnsg Fs1b0Vy0WYvl1r53/xjXKn4iDE+XlG/GShZmUKmM2lecOA9RxxikUvqGdIVxLAspWfE7 uKQHTG+ROl5w3IX0uaVailo4NZKsEWso/P8jQggGAXxTzH+VlfUT+eQaPV5lQfHIMMqB me7g== 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 5si17210043edy.95.2019.10.16.06.36.39; Wed, 16 Oct 2019 06:37:01 -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 S2404181AbfJPJ0c (ORCPT + 99 others); Wed, 16 Oct 2019 05:26:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4185 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389885AbfJPJ0c (ORCPT ); Wed, 16 Oct 2019 05:26:32 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id EF505E7907969BC478FD; Wed, 16 Oct 2019 17:26:29 +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, 16 Oct 2019 17:26:20 +0800 From: YueHaibing To: , , CC: , YueHaibing Subject: [PATCH -next] char: xillybus: use devm_platform_ioremap_resource() to simplify code Date: Wed, 16 Oct 2019 17:25:46 +0800 Message-ID: <20191016092546.26332-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 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/char/xillybus/xillybus_of.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/char/xillybus/xillybus_of.c b/drivers/char/xillybus/xillybus_of.c index bfafd8f..96b6de8 100644 --- a/drivers/char/xillybus/xillybus_of.c +++ b/drivers/char/xillybus/xillybus_of.c @@ -116,7 +116,6 @@ static int xilly_drv_probe(struct platform_device *op) struct xilly_endpoint *endpoint; int rc; int irq; - struct resource *res; struct xilly_endpoint_hardware *ephw = &of_hw; if (of_property_read_bool(dev->of_node, "dma-coherent")) @@ -129,9 +128,7 @@ static int xilly_drv_probe(struct platform_device *op) dev_set_drvdata(dev, endpoint); - res = platform_get_resource(op, IORESOURCE_MEM, 0); - endpoint->registers = devm_ioremap_resource(dev, res); - + endpoint->registers = devm_platform_ioremap_resource(op, 0); if (IS_ERR(endpoint->registers)) return PTR_ERR(endpoint->registers); -- 2.7.4