From patchwork Sun Dec 22 18:50:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307639 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30BB018B6 for ; Sun, 22 Dec 2019 18:51:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DB4824125 for ; Sun, 22 Dec 2019 18:51:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bnPRKiD/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726666AbfLVSuj (ORCPT ); Sun, 22 Dec 2019 13:50:39 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42610 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbfLVSui (ORCPT ); Sun, 22 Dec 2019 13:50:38 -0500 Received: by mail-pg1-f193.google.com with SMTP id s64so7691303pgb.9; Sun, 22 Dec 2019 10:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1MMK/7Lq6Q5MHtrU9nSWhUsHgp2FaIobPnqB6i1bmvU=; b=bnPRKiD/QwgUAYoz9VJpDVZ/p49jbueKzMRH23UoBCumqWMJaoMPQ6dZKsx2LUpLwd 6qLyEJnGymgKxrVXAQeUZyzLjfPstF428bDfW7u4w83ytM7jXae42VT7aKfH8v9Ojho9 ZSeJZpy8feXZePbc8zB0MwLGIxxFHWStinLBTA8nmHI456Nx8CLH5QDFlb6qaKkxsi/t Ik/qjSa8zXDnH7xdgx+rQp5xifmJLeqiEKxY/Lg7e7u82xnxV7U9847OOQQ0ks/JX05+ 5WxkfOP9ggtKlWEpQ4xuDMToMznSBf61l3CgigFqEoUnTL4tC7tWGNmrbXdOGihgMBOJ kJaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1MMK/7Lq6Q5MHtrU9nSWhUsHgp2FaIobPnqB6i1bmvU=; b=RR/L2BCKk6FmmJam92YFG00oIAClCtloxxPF2mpUA0qANMlwAdXrhdxZZ6di76BW30 QY5E+j4rW98e8wlHo+d45MJ7mVoAVG46j8bPvJX2kv+VMlXGpBbt73bfqJvtVDjVQOOz IimUa50HDgxiDZx/+4jB7VRbAXYqQjy9WA8qLLponoM6acG6DJmOjKYLfhn9DhVXddTD UK1cZkiMnJf/rIIJm9E6WxOcqyEB7JTl4IBVSkGqA9lVXSM0ti3l88wjWYAIHmCKVS3M 74hA2IZ9q4zWxZJNMBYDbfFyKInflmqbI9+nPB5vCOFSejFaP/uEin/Qj/Xhtcs6oGg7 aJyA== X-Gm-Message-State: APjAAAW4P81dYvVWj1lXeYIl9clVh8VC3q4JT9r/zErEOv/Jqma3hZM4 jGhhCpMDAF5Vr/MDavqBWzc= X-Google-Smtp-Source: APXvYqylTRiXM3UuNPaW1PQbCJGvvGrSq2F3X2MYO9m7QdlL5O965z+77yHko+WYYeaRM/Y4Tq4vxQ== X-Received: by 2002:a65:4381:: with SMTP id m1mr27847656pgp.68.1577040637744; Sun, 22 Dec 2019 10:50:37 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id t63sm21401643pfb.70.2019.12.22.10.50.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:37 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 1/9] memory: emif: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:26 +0000 Message-Id: <20191222185034.4665-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/memory/emif.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 9d9127bf2a59..9a8463716a54 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1537,7 +1537,6 @@ static struct emif_data *__init_or_module get_device_details( static int __init_or_module emif_probe(struct platform_device *pdev) { struct emif_data *emif; - struct resource *res; int irq; if (pdev->dev.of_node) @@ -1557,8 +1556,7 @@ static int __init_or_module emif_probe(struct platform_device *pdev) emif->dev = &pdev->dev; platform_set_drvdata(pdev, emif); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - emif->base = devm_ioremap_resource(emif->dev, res); + emif->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emif->base)) goto error; From patchwork Sun Dec 22 18:50:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307635 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCCB0138C for ; Sun, 22 Dec 2019 18:51:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B7CD2166E for ; Sun, 22 Dec 2019 18:51:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VayjpuFU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726764AbfLVSul (ORCPT ); Sun, 22 Dec 2019 13:50:41 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37701 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbfLVSul (ORCPT ); Sun, 22 Dec 2019 13:50:41 -0500 Received: by mail-pg1-f194.google.com with SMTP id q127so7710116pga.4; Sun, 22 Dec 2019 10:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UYJMcCSP2xqM3DCf7A/aaQtY9AM0A3U6ItqKBHen71c=; b=VayjpuFUrgdgU4fvbiVH8S3vP3Kc8cakjFEBT0Zel7kuingvSZcvJD7Uqb4oH65Alc ux5vVXmvdS0WecQgYoOET7cvNbt8w3n/m+lts3VNk60W3ubceku2WEvbTeHqILyAHZfD FYAECI3LUY4btBcRcIiOCwfMlxBmnh7LY1Y9IAzQkKgX7n+5moSt17ntif6C8YlcUrcO fvdESi+Ykpr14f083qpPWwKRXyVarWL7WspdirdvgF040RlnSb8BGYX50Sk8ziO9u5vv wiPUicg9NF1+H1zBoDdNbTq9Xh1Z9oPDLK14ToGsC+Zcr+V96UBt8b/PvR/Xsnwjihko st4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UYJMcCSP2xqM3DCf7A/aaQtY9AM0A3U6ItqKBHen71c=; b=AclHhQ9W99xmCtozfEQ60VQhLzWVN2+P1rNRygSkfc7pbAblbgOssZlZjnk5CPSuLv +gi4uHcgtDjmGAvXIabMzSWardxws2rOl5zFnj8UX04WoHeIOdL+rX96zDGhQUkOWqAJ SgUlMp+DOAE/W2q7yHc1LLb+lV1LuX+RBOEHZYd6XxJImVbkxE1wmowEON34OZLsCN9S rEIU+vu1MFKn4U+HdHwnWKHMKYbA6g9gJAXNOhR++Knk5i47Qilmy8a4Q7xEJm6DhLO2 LDenKOl7qWtxpiwdr0a0QoxSd1pK88qkfFXI9VszaePX4uP4Qmux02qm2O0IhJhcxi8v IWxg== X-Gm-Message-State: APjAAAUIglrzaCiZgzZcGo6Sm8GICb+nG2vwA96dySGliSUdcCw/vHyL ioRAgc7Hf3pYQ/lIxFj+uDE= X-Google-Smtp-Source: APXvYqyrXDL6rPmdg4u1kOSJN24AutsewRcg7DL4++UhnjYbNwRfwWeVlRtWZJBYBtLD7vHFGdAtow== X-Received: by 2002:a63:9548:: with SMTP id t8mr26359191pgn.205.1577040640148; Sun, 22 Dec 2019 10:50:40 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id p17sm20557901pfn.31.2019.12.22.10.50.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:39 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 2/9] memory: jz4780_nemc: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:27 +0000 Message-Id: <20191222185034.4665-2-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Paul Cercueil --- drivers/memory/jz4780-nemc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/memory/jz4780-nemc.c b/drivers/memory/jz4780-nemc.c index b232ed279fc3..857a9fa5cba5 100644 --- a/drivers/memory/jz4780-nemc.c +++ b/drivers/memory/jz4780-nemc.c @@ -269,7 +269,6 @@ static int jz4780_nemc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct jz4780_nemc *nemc; - struct resource *res; struct device_node *child; const __be32 *prop; unsigned int bank; @@ -287,8 +286,7 @@ static int jz4780_nemc_probe(struct platform_device *pdev) spin_lock_init(&nemc->lock); nemc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - nemc->base = devm_ioremap_resource(dev, res); + nemc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(nemc->base)) { dev_err(dev, "failed to get I/O memory\n"); return PTR_ERR(nemc->base); From patchwork Sun Dec 22 18:50:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307627 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70E1217EF for ; Sun, 22 Dec 2019 18:51:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F2CF2166E for ; Sun, 22 Dec 2019 18:51:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LkGP531X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726840AbfLVSup (ORCPT ); Sun, 22 Dec 2019 13:50:45 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43695 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbfLVSun (ORCPT ); Sun, 22 Dec 2019 13:50:43 -0500 Received: by mail-pf1-f195.google.com with SMTP id x6so6994125pfo.10; Sun, 22 Dec 2019 10:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T2D+rZhLHzhPfVvf+7jno9xAtOV3Jp4ift9l+qrE9Ys=; b=LkGP531X5gDnvg3YLvStNo2Anp2FTAWZs+KrmtshWJS51Ttx9jLOMBVt48E3uoyh/2 4EeIz2hZfntIkS3VG766gehaapy++8prA0MiOdE8pZ3HF4v+ys/0qXzGuO+o7xhMABKb OBhOFDhYKscNgmBcpvmzxK5wJEO2gNcqQSDeDul6y7a7IHcTM9U6bg85ZwL96SD0BC/W e6U64/iA6ZLdu0HcpKcFCyh+zUUfzNJHo6NORfFAIuY7LVTDbh9hpiowx0TPltMIjq9G +WzelQC+/Y2ht+i2RdnVapYbeiEB8LQL5GTbRbJ7WlEvIP4Kuk2tozIffHXzWm9RAvW3 U3tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T2D+rZhLHzhPfVvf+7jno9xAtOV3Jp4ift9l+qrE9Ys=; b=E5x8DClDKC8Bbqx1MON5Cj4W9ocE38CmJw+9lNU32TFSiT57rmlHAb4Ud/NQCHVT0N GzB7UTlAbLteIVDr0HUgLpLHOTK4Jd2RTH+qEHiOpW+jfostTeCu6neQidzLLHu4MvIt hzqI3BrVE5G2mpVRdE1NCnmD03+yYWfsPpkqJYKSCOq7fDFzjvVbTA6oB7es4osEqu7r DSsgiDS4U97Uqkyda1C/331qSyX3jq1B5cknfVVm5autWAZgVzFYzLpFfGCi0CDkuXDO Y1G5TPDfRGkpIvDXGQKGqjGhGQg1r7n70nXZlzrQZlp0BfnyMWGbXfMK4kE+NrrmjdRr qOwQ== X-Gm-Message-State: APjAAAUm3MPSOgNuVoX2G2wredQIupYvGG6ZIxrQXX/8tc0SOr3IMIrG QoZqueCGWVsr8IOPqspNtiY= X-Google-Smtp-Source: APXvYqx7+WwBdDmKMRn7IPzVdGaGjqVOSqHcY5smgx72jF1ROSO1rTBtd04VYHH+mMeVbGzx5CwrWw== X-Received: by 2002:a62:1944:: with SMTP id 65mr29356374pfz.151.1577040642355; Sun, 22 Dec 2019 10:50:42 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id e4sm10449812pfa.44.2019.12.22.10.50.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:41 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 3/9] memory: mvebu-devbus: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:28 +0000 Message-Id: <20191222185034.4665-3-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/memory/mvebu-devbus.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c index 095f8a3b2cfc..886aea587276 100644 --- a/drivers/memory/mvebu-devbus.c +++ b/drivers/memory/mvebu-devbus.c @@ -267,7 +267,6 @@ static int mvebu_devbus_probe(struct platform_device *pdev) struct devbus_read_params r; struct devbus_write_params w; struct devbus *devbus; - struct resource *res; struct clk *clk; unsigned long rate; int err; @@ -277,8 +276,7 @@ static int mvebu_devbus_probe(struct platform_device *pdev) return -ENOMEM; devbus->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - devbus->base = devm_ioremap_resource(&pdev->dev, res); + devbus->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(devbus->base)) return PTR_ERR(devbus->base); From patchwork Sun Dec 22 18:50:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307587 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0196013B6 for ; Sun, 22 Dec 2019 18:50:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8E832084D for ; Sun, 22 Dec 2019 18:50:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IWvfa6cb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbfLVSup (ORCPT ); Sun, 22 Dec 2019 13:50:45 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46163 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726824AbfLVSup (ORCPT ); Sun, 22 Dec 2019 13:50:45 -0500 Received: by mail-pl1-f194.google.com with SMTP id y8so6309453pll.13; Sun, 22 Dec 2019 10:50:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zogEy1R5bHAzYb0JSK89rU9lJX3Wruc73hLWvRKN/jg=; b=IWvfa6cbF84MPkGoGhvjZjcoRqq4uO59BCTZeZG/vKbNza8MhOFdV5dpqdOq7FHmtn piFe9b6NPPyBI5IY4Cl+FYvpDwNgr94dUjj3j7lVDgHfkzRmsoukLUeXmQovUjSiJMnF vJ8FBnGPHmWYy/VsFOKNb78z+ZaEK4AAjVvEgk3tfth0ea3Q+ikx/oPCDxZT/3njhlYg bCVJZA6tvnmCmhhXN+q/DPlritdPq3ayfH9wus/5n0RKF2LiKYlRvvKj/6L5Gtv5WMaU 7OBqrDoxyuurfeOCt04NsK6fJWfx7LOBZhGRHafGemQHEn7CZBxD6e2rgcmx4YvPx6dd 9AOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zogEy1R5bHAzYb0JSK89rU9lJX3Wruc73hLWvRKN/jg=; b=a3fUg6B+Qtj9tokuAKGzUtiPf+OAD1WeYI/f0Ijn/fu0G/E4ORobmrdHklSOelsDWw b2/0ZoSKh+nVw1GWY+4LvqRCwYLErOCeQCaw3uYHmZrN/As4GwqnRAzYIVw0B8hVcqPe P3ROgZC5FtSTGWwO/7UvjfktPaTHmpw+i8yBhOVkfz5sCqQiHdjEbaQT1dhPWRBOcW5Q nf5YwPpT7Tk1wMMGUde5n3DTn1WIQq4/RNfz3NelwA3TZ4webfENaticvdorPnysVDgF shR3KPqaYtd6u83QYakKlz6mkYMRuiXRtpbt1lbmm4ZtD9Y6rwaxMQiwMEklYTU/nQ/Z FvZQ== X-Gm-Message-State: APjAAAUaTjE96tFrEkMqN1kjFI5ToliYatFX9HbGcCw58UTmLG6nGRdY luMp9X05F8PUE+tqM3FOnC4= X-Google-Smtp-Source: APXvYqyKKfxfSyCuABzQ6eqEF5lsR+6vnx8hRy7dJwwQCFJClBYG8jWJoC5x8F/QV0jwvtIYirEEig== X-Received: by 2002:a17:902:b681:: with SMTP id c1mr27401740pls.220.1577040644128; Sun, 22 Dec 2019 10:50:44 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id f8sm21035451pfn.2.2019.12.22.10.50.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:43 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 4/9] memory: tegra: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:29 +0000 Message-Id: <20191222185034.4665-4-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Dmitry Osipenko --- drivers/memory/tegra/mc.c | 4 +--- drivers/memory/tegra/tegra124-emc.c | 4 +--- drivers/memory/tegra/tegra186.c | 4 +--- drivers/memory/tegra/tegra20-emc.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index ec8403557ed4..71390d4ad809 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -593,7 +593,6 @@ static __maybe_unused irqreturn_t tegra20_mc_irq(int irq, void *data) static int tegra_mc_probe(struct platform_device *pdev) { - struct resource *res; struct tegra_mc *mc; void *isr; u64 mask; @@ -619,8 +618,7 @@ static int tegra_mc_probe(struct platform_device *pdev) /* length of MC tick in nanoseconds */ mc->tick = 30; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mc->regs = devm_ioremap_resource(&pdev->dev, res); + mc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mc->regs)) return PTR_ERR(mc->regs); diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index 464f0ceaee63..2c73260654ba 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -1085,7 +1085,6 @@ static int tegra_emc_probe(struct platform_device *pdev) struct platform_device *mc; struct device_node *np; struct tegra_emc *emc; - struct resource *res; u32 ram_code; int err; @@ -1095,8 +1094,7 @@ static int tegra_emc_probe(struct platform_device *pdev) emc->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - emc->regs = devm_ioremap_resource(&pdev->dev, res); + emc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emc->regs)) return PTR_ERR(emc->regs); diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c index 441213a35930..226d2b16036d 100644 --- a/drivers/memory/tegra/tegra186.c +++ b/drivers/memory/tegra/tegra186.c @@ -534,7 +534,6 @@ static const struct tegra_mc_client tegra186_mc_clients[] = { static int tegra186_mc_probe(struct platform_device *pdev) { - struct resource *res; struct tegra_mc *mc; unsigned int i; int err = 0; @@ -543,8 +542,7 @@ static int tegra186_mc_probe(struct platform_device *pdev) if (!mc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mc->regs = devm_ioremap_resource(&pdev->dev, res); + mc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mc->regs)) return PTR_ERR(mc->regs); diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index 1b23b1c34476..d2efd0c658c0 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -482,7 +482,6 @@ static int tegra_emc_probe(struct platform_device *pdev) { struct device_node *np; struct tegra_emc *emc; - struct resource *res; int irq, err; /* driver has nothing to do in a case of memory timing absence */ @@ -518,8 +517,7 @@ static int tegra_emc_probe(struct platform_device *pdev) if (err) return err; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - emc->regs = devm_ioremap_resource(&pdev->dev, res); + emc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(emc->regs)) return PTR_ERR(emc->regs); From patchwork Sun Dec 22 18:50:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB8B913B6 for ; Sun, 22 Dec 2019 18:51:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8E99205C9 for ; Sun, 22 Dec 2019 18:51:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pA1DVika" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726882AbfLVSur (ORCPT ); Sun, 22 Dec 2019 13:50:47 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42615 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726871AbfLVSuq (ORCPT ); Sun, 22 Dec 2019 13:50:46 -0500 Received: by mail-pg1-f195.google.com with SMTP id s64so7691401pgb.9; Sun, 22 Dec 2019 10:50:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8Ke6kqD8tx5FW4sG+uR1d5yqGchz/JTf5FhvZT4do5s=; b=pA1DVikadxBfRY27jeihducxVZcsjiRL9ghBfctBvs6ZO4Nzw9RcFo8JL+vI3Ob2qO kfIWVtELyEWwbBFrmQuS9TlUXJoI2ZXaMgUjM2+QNtQs4gAxN39H09VpPJORgdD3S+ae UJ/S6SJGnD9CQnsPAL9ZW6q8lDL8kN+6/dMakPkxmTf6qZKTASfCXAnE6acSiGCsjfzB YGsQ6Wdm+2dRzZuiUnASU3cJQ8W/hVWCvSgoHW8d1VY8rb/FdZlFx+sm2T91etppHTAC zmb2tZ4GKc3cf2UlfJNNAy4JooFD/sozpspHVhsH6swJLMP25eGYU25CYBDdskeJKtIR /oiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8Ke6kqD8tx5FW4sG+uR1d5yqGchz/JTf5FhvZT4do5s=; b=Kx8ydbSf6sUVOPlcnIfUbM1GWyUvmGNIPF39njZgx061ppKyah0HBbhRnGxEJXq0d0 wJZQHXyAKx67/CKaRTpDtpInMb9QVuN0HGToAdvtkzqQ0KsOp7u27Y/ru9zJAx8H6xUE 2dTOAp+MHQtLwcXz6CIfu0/DLd3CSqcW6ElXXBJ8AydnWLb2lpEXzq+F3uJ9QjWeNQSS KSqBgb2tt8Zv74NkqjWFrAvix54JTQi+3WQYirtThIjlS/B2qykfApA7uZMozAOYBMIY 3ivdAl0Zv8+dMUzoIAbgTQHc6RgQKq/9t9uzL5wxaiCxoghnjzRHMzRq3SNiAZ2UAlPW wG5g== X-Gm-Message-State: APjAAAXLpga9xj9K+D4jwzsV4biJvGKegLklFISqKojQ7/R1zzk4csBA MPpkwhtIHnPPgapVJkO0t5U= X-Google-Smtp-Source: APXvYqwpM2sa3hdG1WNZtPR1Q7FDppkkNNMGcWgtij5ugBsoXwFPTfryKohmVTiLz+00EJ9OPdBpLA== X-Received: by 2002:a62:2643:: with SMTP id m64mr14416885pfm.123.1577040645578; Sun, 22 Dec 2019 10:50:45 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id s24sm11628635pjp.17.2019.12.22.10.50.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:45 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 5/9] memory: fsl-corenet-cf: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:30 +0000 Message-Id: <20191222185034.4665-5-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/memory/fsl-corenet-cf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/memory/fsl-corenet-cf.c b/drivers/memory/fsl-corenet-cf.c index 0b0ed72016da..2c62312ea513 100644 --- a/drivers/memory/fsl-corenet-cf.c +++ b/drivers/memory/fsl-corenet-cf.c @@ -172,7 +172,6 @@ static irqreturn_t ccf_irq(int irq, void *dev_id) static int ccf_probe(struct platform_device *pdev) { struct ccf_private *ccf; - struct resource *r; const struct of_device_id *match; u32 errinten; int ret, irq; @@ -185,13 +184,7 @@ static int ccf_probe(struct platform_device *pdev) if (!ccf) return -ENOMEM; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) { - dev_err(&pdev->dev, "%s: no mem resource\n", __func__); - return -ENXIO; - } - - ccf->regs = devm_ioremap_resource(&pdev->dev, r); + ccf->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ccf->regs)) { dev_err(&pdev->dev, "%s: can't map mem resource\n", __func__); return PTR_ERR(ccf->regs); From patchwork Sun Dec 22 18:50:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307609 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 18C9217EE for ; Sun, 22 Dec 2019 18:51:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB584207FF for ; Sun, 22 Dec 2019 18:51:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U9wWDWIi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726905AbfLVSut (ORCPT ); Sun, 22 Dec 2019 13:50:49 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46289 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbfLVSur (ORCPT ); Sun, 22 Dec 2019 13:50:47 -0500 Received: by mail-pg1-f193.google.com with SMTP id z124so7688992pgb.13; Sun, 22 Dec 2019 10:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jPs8btFmLJCvfF7hm3VTorkXTs5PUOJURx/gZ3fO9eo=; b=U9wWDWIi3n8EDeWs3WHwGy7eoXyLGsrOlw/hUKX+ISHOS3xn5Dad3I37IpGKVcYmpX c7ssXhvzL+NYvVCdQBGVuc50r3MblDmMPwNUscnf9MONE6923+V6+iIWt1bajkdgp0y9 RKw8mWWzpDFxm6SCqJ9rApfBvxXwgdNBdG/M/2FR2KOsCmKyZPm+Ud+ZyGN7hbvJkTqe x3teVL8N7hNg6tKSDWuiLMPbAf/L/TBXIyBM6IBj0/DfwNpcMRvYmN+mBnER89RTEuJ+ ffKqxUz0SFPgfauy3nPc89x2GmKowZLpaEAnJRv7PQL00t1LmCsx1YS3S906MMWlHTmU OFKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jPs8btFmLJCvfF7hm3VTorkXTs5PUOJURx/gZ3fO9eo=; b=WC4d8OVwejYQNlQ4WjND6EgmZ38T+hLZ7C/pFcqV0+F/zkVBHPfvpsihhinCIoQAqP AtOKPYfgojrcnojLJ7YVQ1FzUgzmDs1pzNVzv+Q5dmpzedj/1oT+5pu0LjbA+4nMq+73 AKlOlzMna5IdF+DitTa65RUqEmHzfUSAzb4+X05SOOD3hPnWGgEL4cJeeP20dgDjPd4q pJLPtedOcrAus0gWkl/s/1bPp71vtgTCWa32FG53Hbbj/CKMineamlRYjSyOGDwYba+I kjAGhWGjSbKMQSyYqeOAUmu2IIP7flmiZvFW82hKDXxsEDHHrd4EtMPoOQHPpYtUU5KS XYfw== X-Gm-Message-State: APjAAAWqvShzic38f7p2E3kkhpKd3T/F3R7awlsibyre9Sv2u+Ik88Z3 QrgJHtKsV58DmRIdiFPHFz4= X-Google-Smtp-Source: APXvYqy5fHyoKX5i2orUytoXPpDCOFDkYgEOajqHueKFcpqGwfh052+BcQyINUsUMtnaA5I3q4bl8g== X-Received: by 2002:a63:780d:: with SMTP id t13mr26159519pgc.82.1577040646922; Sun, 22 Dec 2019 10:50:46 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id 73sm19170792pgc.13.2019.12.22.10.50.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:46 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 6/9] memory: ti-aemif: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:31 +0000 Message-Id: <20191222185034.4665-6-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/memory/ti-aemif.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c index db526dbf71ee..6524229f634a 100644 --- a/drivers/memory/ti-aemif.c +++ b/drivers/memory/ti-aemif.c @@ -328,7 +328,6 @@ static int aemif_probe(struct platform_device *pdev) { int i; int ret = -ENODEV; - struct resource *res; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct device_node *child_np; @@ -362,8 +361,7 @@ static int aemif_probe(struct platform_device *pdev) else if (pdata) aemif->cs_offset = pdata->cs_offset; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - aemif->base = devm_ioremap_resource(dev, res); + aemif->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(aemif->base)) { ret = PTR_ERR(aemif->base); goto error; From patchwork Sun Dec 22 18:50:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307611 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D34E2138C for ; Sun, 22 Dec 2019 18:51:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AFA55208C3 for ; Sun, 22 Dec 2019 18:51:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XMuF8azL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727076AbfLVSvH (ORCPT ); Sun, 22 Dec 2019 13:51:07 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44635 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbfLVSut (ORCPT ); Sun, 22 Dec 2019 13:50:49 -0500 Received: by mail-pl1-f195.google.com with SMTP id az3so6311476plb.11; Sun, 22 Dec 2019 10:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vbA/SxZM7arQJSBxpfLhl1W8O2cnxPsWXhCTQaV8bqw=; b=XMuF8azLQN02i51bK7MY+jsZOPuqljSFDQgTsKdhh/pVSDPy/Tc4Gonb84B+avBTxQ c+o5IEggvioE6o134w67CrN1EyeSkThBdEfhNJP4Wb1GBH1Ss5BKT4NL3ne5lNCTGXLS xS6D3cR8dWbtXmiz1R6o4g7L+MltNoUyyYBDpVKhhubsWNrxgTi0WZHa4pQ5Xg42aS6w teG+bEYZpVdyQh+ds0QAnXz8ja1v38+nAUm8w1vSfjCQeg7wTryA9jaK2I4YRRyknGYb H4R32GOSUf7Dn7CNRQ25OkWuDyniKGfpp//nxHF3E1GORs8KP2h2vgggNn+zldhjXWEA Y7Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vbA/SxZM7arQJSBxpfLhl1W8O2cnxPsWXhCTQaV8bqw=; b=g0mlvZBf0suIwkho0ORr/fsXaADQXs/M9jXsOfs58XDfrmv9c1niQkswJUABdZMHaH U8M9AI7Pq6Q1lvseMRRTUJdMBIY1o8m8sEKQSUHaYSLM2TiMjfpq7XOfJrjrkrDV6/y+ pDrKRn6xG5KkcKOYzCKrs+k2XxSHZa5Fgs0O119uXOb8YNzLFGzfxb6/6uVLC96aV3tH +OShZLnTqxckxpvZBEy9VrUa8zm/klcS+JnJoCSxbHTYi8YxNUXWQkf7EFtyRvvJtcG4 bUa7p/PvQrWVK4dk3bV469jsJJey5bzinoffRvbkilB7Yc8QxjmQ7q/vm3r7VT1IkfRA sevw== X-Gm-Message-State: APjAAAWM/UFqjjAGm5OFCStOBG7ymU7MMFbKOb+K7jhwQ+7cEUY+ZdhG cLa34aKs9yYaU5eE2iEIN40= X-Google-Smtp-Source: APXvYqwGfChxQFCRaBEjK6UXxlwsQA4EJFSFKV8mJBq+/pqe5eDbStpHvTiuLM5YyMNnYuew2Vtf+g== X-Received: by 2002:a17:902:104:: with SMTP id 4mr27974553plb.130.1577040648012; Sun, 22 Dec 2019 10:50:48 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id m6sm12090747pjn.21.2019.12.22.10.50.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:47 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 7/9] memory: samsung: exynos5422-dmc: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:32 +0000 Message-Id: <20191222185034.4665-7-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Lukasz Luba --- drivers/memory/samsung/exynos5422-dmc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c index 47dbf6d1789f..81a1b1d01683 100644 --- a/drivers/memory/samsung/exynos5422-dmc.c +++ b/drivers/memory/samsung/exynos5422-dmc.c @@ -1374,7 +1374,6 @@ static int exynos5_dmc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct exynos5_dmc *dmc; - struct resource *res; int irq[2]; dmc = devm_kzalloc(dev, sizeof(*dmc), GFP_KERNEL); @@ -1386,13 +1385,11 @@ static int exynos5_dmc_probe(struct platform_device *pdev) dmc->dev = dev; platform_set_drvdata(pdev, dmc); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dmc->base_drexi0 = devm_ioremap_resource(dev, res); + dmc->base_drexi0 = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dmc->base_drexi0)) return PTR_ERR(dmc->base_drexi0); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - dmc->base_drexi1 = devm_ioremap_resource(dev, res); + dmc->base_drexi1 = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(dmc->base_drexi1)) return PTR_ERR(dmc->base_drexi1); From patchwork Sun Dec 22 18:50:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307605 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AAC9417EE for ; Sun, 22 Dec 2019 18:51:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 889BB205C9 for ; Sun, 22 Dec 2019 18:51:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZpEDu81z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727031AbfLVSvC (ORCPT ); Sun, 22 Dec 2019 13:51:02 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39398 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726924AbfLVSut (ORCPT ); Sun, 22 Dec 2019 13:50:49 -0500 Received: by mail-pf1-f195.google.com with SMTP id q10so8079519pfs.6; Sun, 22 Dec 2019 10:50:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2mMsPo8M3x876TJIPv/V9kMTnJlbEepMVzpgXqdmw0I=; b=ZpEDu81zRHBqo3RV+PuHNZpFGIZ0wGCPWy0hCPcLUTHwoe6j+6Tx2+RBVyksDlngTK myaP/2Gs758aoeYWPfu+UwIVsRkdRh2WRHJJyVIsT7SjBgdU7nrLOVzdkap7wePcNF65 51ANI8s4JJowIaPkgDAgKgcHJxo9wbPnrF7Ym5oE7or4f8qY7FDW17B4k+Dlz5gzBAsB 4an4A++rTJeqU75iqy9JoNdAXj+vCb4XLdhvt7NKIL26hxzEjqKLOa1p5Kg3Ia1AUxMB Vnq+ZdjHbajAsFP/w/hTbmnry1R/ur7tTeDdaXUVtwEWnLybI/lMITQ/Ostu/yvnJ7TJ OGbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2mMsPo8M3x876TJIPv/V9kMTnJlbEepMVzpgXqdmw0I=; b=G6/gxngHHnbJXf1rf7uP3A/UL174Sm2ptQeB5ifXnr4ABRfx/5qOqplwwKbCcVLkSj iJmX190QGkWQ5lyGuIPO3Lsly2yDA0SZZvXWkDWaV39t3pzPCbe3fceLV24Frb5YprNp LbNVdq5tZLVmi6a1J5hgI7o/vXBQ2PjdIPRAU2gkIvcGxwo+0PcH+D/oaOwXOrVJ8AXU /h/hOZ8GPnGsHCHZU4x0IB4kVUdlYbo5PpWX8FPfs7PES1yaDBfwSbX2+VZ9/2JM2EAr qOr1zontoCpl4rmltQzv6BTcdn+yeZ/48KEUnkMZT1+AuoeEmEq6eH94xfkQNJivh1rF Cx7A== X-Gm-Message-State: APjAAAWBC1eG4oP/mQWxPIgyNl1gaJVutU/zkkUFFC9/DRuRvzOZQRNc eSH6RERbViPG7EZINmf80uA= X-Google-Smtp-Source: APXvYqy/rBMV+0mmOMQ2OMs4KFh2sPHwhPOhJ+NSHNisuaZbPxtgXlTivp/vRnvcVVkI8GuQChVzcg== X-Received: by 2002:a63:f64a:: with SMTP id u10mr26539866pgj.16.1577040649079; Sun, 22 Dec 2019 10:50:49 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id a12sm18584043pga.11.2019.12.22.10.50.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:48 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 8/9] memory: mtk-smi: convert to devm_platform_ioremap_resource Date: Sun, 22 Dec 2019 18:50:33 +0000 Message-Id: <20191222185034.4665-8-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Yong Wu --- drivers/memory/mtk-smi.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index a113e811faab..1cc5d94036a2 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -269,7 +269,6 @@ static const struct of_device_id mtk_smi_larb_of_ids[] = { static int mtk_smi_larb_probe(struct platform_device *pdev) { struct mtk_smi_larb *larb; - struct resource *res; struct device *dev = &pdev->dev; struct device_node *smi_node; struct platform_device *smi_pdev; @@ -279,8 +278,7 @@ static int mtk_smi_larb_probe(struct platform_device *pdev) return -ENOMEM; larb->larb_gen = of_device_get_match_data(dev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - larb->base = devm_ioremap_resource(dev, res); + larb->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(larb->base)) return PTR_ERR(larb->base); @@ -419,7 +417,6 @@ static int mtk_smi_common_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_smi *common; - struct resource *res; int ret; common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); @@ -453,8 +450,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) * base. */ if (common->plat->gen == MTK_SMI_GEN1) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - common->smi_ao_base = devm_ioremap_resource(dev, res); + common->smi_ao_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(common->smi_ao_base)) return PTR_ERR(common->smi_ao_base); @@ -466,8 +462,7 @@ static int mtk_smi_common_probe(struct platform_device *pdev) if (ret) return ret; } else { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - common->base = devm_ioremap_resource(dev, res); + common->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(common->base)) return PTR_ERR(common->base); } From patchwork Sun Dec 22 18:50:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11307595 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BF3B138C for ; Sun, 22 Dec 2019 18:51:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A013207FF for ; Sun, 22 Dec 2019 18:51:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RdmiiwF6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727005AbfLVSu5 (ORCPT ); Sun, 22 Dec 2019 13:50:57 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:44635 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbfLVSuv (ORCPT ); Sun, 22 Dec 2019 13:50:51 -0500 Received: by mail-pl1-f193.google.com with SMTP id az3so6311496plb.11; Sun, 22 Dec 2019 10:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=obMvYqnbW6FnclvcaTw1U7yQPLStwyHiLSMoMgJ8DMo=; b=RdmiiwF6babAQFWUpUGLy2DZqAwZAi8V33zgiNx7dj87h8phOlTYHtZOMDCQtXFOit coQqalsXFCLZlPp6YJ4THC2t7m8EEi9PnxcIXgnqBv8YojpdwQ8b1z12w3XbHM6gRe2N 9cXHFVzTg5EsYmr3AiWsmm30sn/yrNbhfuYIlptfe1Mjzl/GJ0cPIIf7zQeTlWRApwyt ceX5KsTvJkHVzT/jsg270BpkQa+0B9D2w9kYdnxox243iMIwwKPCl092zGtmcZOreNl2 ops0dZYFpd4iyt33sNOKbW/8D9fDi76pS+zAn59mN4DcCTF39VQKSGfc5uBhAnozFnSr F3RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=obMvYqnbW6FnclvcaTw1U7yQPLStwyHiLSMoMgJ8DMo=; b=G8PYNmtuMvR6IFaeFdzhSdc8bErBVwYddSXJNs9sGiXm8DFWCkIpqr3X5pU4S8agP1 jBky9OWRuIYr9C+ddhq5IYKTAlM4nARrJaddy1S6Fd0BCha08t92Mg0izesKZrv6KG6h 7CQN5HMFQokdrlJBU3DedCDc5XyTGCWmbPGrlhrF9ZfmKQk4xxKqSNWsAxIWcYRt4OYq FlCOiNR7F+0krsWl8PxUujbHcSkHaOcxb9/Cty7IYngZIZWjZgOERoASiNLRa5FNmBgK 5kN/7M7EQL2dbN0mPCgWyuAV9q1srnNCOa4jE5/D8e6uVcDHFgggo/NoRG3uRHSwgCR+ 6TxA== X-Gm-Message-State: APjAAAUOrQ+8mwvA+9oANuSbpUlFpmm342QAwKLAVR9gEee0kd3YcPYE EpreUJaFfcvXs59AGN0FyS+dXIeY/no= X-Google-Smtp-Source: APXvYqynfZtZtMfgSs1bDem4Zo+v6lSrgRDKxVTy4vingOzHr5+fBrYwncpXVgh6n1vtEUTebtVYcQ== X-Received: by 2002:a17:902:6bc9:: with SMTP id m9mr26918356plt.260.1577040650351; Sun, 22 Dec 2019 10:50:50 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id x8sm21284906pfd.76.2019.12.22.10.50.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 10:50:49 -0800 (PST) From: Yangtao Li To: ssantosh@kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com, lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com, jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com, digetx@gmail.com, pdeschrijver@nvidia.com, john@phrozen.org, alexios.zavras@intel.com, sboyd@kernel.org, kstewart@linuxfoundation.org, info@metux.net, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 9/9] memory: omap-gpmc: switch to platform_get_irq Date: Sun, 22 Dec 2019 18:50:34 +0000 Message-Id: <20191222185034.4665-9-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191222185034.4665-1-tiny.windzz@gmail.com> References: <20191222185034.4665-1-tiny.windzz@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for requesting IRQ's resources, as they can be not ready yet. Using platform_get_irq() instead is preferred for getting IRQ even if it was not retrieved earlier. Signed-off-by: Yangtao Li Acked-by: Roger Quadros --- drivers/memory/omap-gpmc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index eff26c1b1394..6dd19d168f75 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2366,13 +2366,9 @@ static int gpmc_probe(struct platform_device *pdev) if (IS_ERR(gpmc_base)) return PTR_ERR(gpmc_base); - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) { - dev_err(&pdev->dev, "Failed to get resource: irq\n"); - return -ENOENT; - } - - gpmc->irq = res->start; + gpmc->irq = platform_get_irq(pdev, 0); + if (gpmc->irq < 0) + return gpmc->irq; gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck"); if (IS_ERR(gpmc_l3_clk)) {