From patchwork Tue Apr 7 16:37:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207736 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2747FC2BA1A for ; Tue, 7 Apr 2020 16:37:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED8412072A for ; Tue, 7 Apr 2020 16:37:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iwe55r88" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726910AbgDGQh4 (ORCPT ); Tue, 7 Apr 2020 12:37:56 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36315 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbgDGQh4 (ORCPT ); Tue, 7 Apr 2020 12:37:56 -0400 Received: by mail-pf1-f194.google.com with SMTP id n10so1052832pff.3; Tue, 07 Apr 2020 09:37:55 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=i7NXUncttHKn24gmiTbFFll7Tmqd1p9Knemu5Uatb0Q=; b=iwe55r885GatNZT/3ayY95HLjmr9mDeuCoNfY/f1yoWQygO/ZJt+BgrNywiiiew22i +wL8BiREp1P1ENUterdhLuTYiFdguIMDZBbgn78DChRYQFxZ/JyeBS1v1nrdEARLJ2aH f2cVIQ1LSe30JSIxXWDvYplWTkpIjDyDeyLsrhGdbVcodGbmu6SYmT4czYNeUpQpgFbc 1ZKzJsQEAOZqCBzQDYHFyk/rOvdpN+g9eZdaeVFdmShHObqyPfABlczCFSvkwlaKU5Fi zgc8Ox0W8h4mCKByKL3q7cqzpQCtLCoCibGWq5ky3NuCad3NTsS0ZzpkM8MrUdH/lFSm aU+Q== 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:mime-version:content-transfer-encoding; bh=i7NXUncttHKn24gmiTbFFll7Tmqd1p9Knemu5Uatb0Q=; b=NXDncofDcQ8xobOKAUHuQ9xzLctJ/+l9t1IyhiOx25uWCL13XNZ03cLgCom7qoWwBE IOlHmDezMdTeteFAwtfIuYrqIVh6CXNso0nxPwMLk90jyWq8ByEc0qkR6w96FlamNfJT SPLjaGbfa+XDbyNH9Z8srf+IlDp/iSt1HSvzv4PT0bZcqLuFNfHRYAwBE0JDox5qvTju fqNhDd6+RR6cRXKGnoO+oSUNC/DspQEiqj5b0kxiNromOcXorlRFXCTpiQd6jjVklVlY BCR6xV19T/K3RzkBgz5qc0lqV3xQI36kFcpG8XUto0wyZv6UB/qyGBt31sppmrNZhaN3 DwKA== X-Gm-Message-State: AGi0PuYnrPxVgWyJkXcZ2fivs+tLJfku9i+1CEayBffIjedLsYXTSPAg e8UY5Dkzn9hJIqI5FuYtvJk= X-Google-Smtp-Source: APiQypIuEQro2fvQdRcmyYhdnJrBbSGHACksbqKRSxW8eqGjZyqJb3/KxcpUDtn15jSEGpWMJ341QQ== X-Received: by 2002:a63:8b42:: with SMTP id j63mr2724840pge.27.1586277474958; Tue, 07 Apr 2020 09:37:54 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id n100sm2008856pjc.38.2020.04.07.09.37.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:37:54 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 01/28] i2c: img-scb: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:14 +0800 Message-Id: <20200407163741.17615-2-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-img-scb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c index 20a4fbc53007..5e0022e55315 100644 --- a/drivers/i2c/busses/i2c-img-scb.c +++ b/drivers/i2c/busses/i2c-img-scb.c @@ -1330,7 +1330,6 @@ static int img_i2c_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct img_i2c *i2c; - struct resource *res; int irq, ret; u32 val; @@ -1338,8 +1337,7 @@ static int img_i2c_probe(struct platform_device *pdev) if (!i2c) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->base = devm_ioremap_resource(&pdev->dev, res); + i2c->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->base)) return PTR_ERR(i2c->base); From patchwork Tue Apr 7 16:37:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07237C2BB55 for ; Tue, 7 Apr 2020 16:38:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDAD52078C for ; Tue, 7 Apr 2020 16:38:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fOF7nCzU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728477AbgDGQiH (ORCPT ); Tue, 7 Apr 2020 12:38:07 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34874 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727235AbgDGQiG (ORCPT ); Tue, 7 Apr 2020 12:38:06 -0400 Received: by mail-pg1-f195.google.com with SMTP id k5so1992936pga.2; Tue, 07 Apr 2020 09:38:06 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=hdJkyJA4DQXKPFAUZLrofPOr39Sm9qcTCxF4bAfmE/Y=; b=fOF7nCzUQJZoKsDaz3OM3MD7cErAofwPUiygWqLcorxuMl3NLIb5r+OkJ9j9/9be4F PtwRZMm00LR2HMIxnccl+XGsz9tu4Ft4D5s9mzik+MlW0S0daZyiSZZKEsy3NgXI8L3x dbBSy7gMOKlFjBlrN3OhpgBTRMsYT3ISWIWW1nVqb2S82mexGR32GTMQgI76oG72HQQ0 wohWth2e5VLYEsPa9S3Sdhqn8MfHzNLmZnkDjcFJObItOMoViReV0CCJZgx6gkQ5xVvM MR2QLdO8VAUfmxAfI+gz6ct1K4O0VlCfsvHmb2nhkaHbYfl873B6tHiQETJ6NRpN2MCv TQVQ== 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:mime-version:content-transfer-encoding; bh=hdJkyJA4DQXKPFAUZLrofPOr39Sm9qcTCxF4bAfmE/Y=; b=obj8FkCex/qiNMH4HIOAtGmFEq7I1SVwuXwx806dt2JljOYj+L1VsPTI9IgMns6U6T cxlqw8QRaymgVmPQzPYOOOWfdwZjLbndATv1ni+ELXzBD84PFIlGVe/z2LlY8HDDGohj pOBmVZ7dZpd0RY/eoEEnK7gkTozZ3ZzWFMPOiGjbd2CQC8xeUg80G2erlBIgLUfpH4x5 ckUPoStKJnyp7Fg8Qf+WVOJExI8ptP+W4RtI7wi8S8q5obZQ2NGWXY38Czjr2IHMs6P/ hEQyGp6HYxiC6kf4iPkyIZSwmIX8xpOxGLejMznYOYYJ1mQFQavI/qUWFyerlq2xPvFj bRzA== X-Gm-Message-State: AGi0PuYspI/ihKY/v0V02SZdeqNahsOG+eDkTsMRBPoO/wKa6Se1zWs+ f+wBQvIeC5h6MVsXX7i03vw= X-Google-Smtp-Source: APiQypJy8UFTKojsVLCdd0786n6/aw7aVRh3TWA08xrxOmCbrzfj6rmqIfuD0jnv/7QxyvnjfY44tQ== X-Received: by 2002:a63:d84f:: with SMTP id k15mr2752575pgj.137.1586277485728; Tue, 07 Apr 2020 09:38:05 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id h16sm765003pfk.38.2020.04.07.09.38.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:38:05 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 03/28] i2c: owl: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:16 +0800 Message-Id: <20200407163741.17615-4-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-owl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-owl.c b/drivers/i2c/busses/i2c-owl.c index b6b5a495118b..c9e7fcac12ae 100644 --- a/drivers/i2c/busses/i2c-owl.c +++ b/drivers/i2c/busses/i2c-owl.c @@ -399,15 +399,13 @@ static int owl_i2c_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct owl_i2c_dev *i2c_dev; - struct resource *res; int ret, irq; i2c_dev = devm_kzalloc(dev, sizeof(*i2c_dev), GFP_KERNEL); if (!i2c_dev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c_dev->base = devm_ioremap_resource(dev, res); + i2c_dev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c_dev->base)) return PTR_ERR(i2c_dev->base); From patchwork Tue Apr 7 16:37:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70F96C2BA1A for ; Tue, 7 Apr 2020 16:38:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48AD420771 for ; Tue, 7 Apr 2020 16:38:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jWHL7xng" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728232AbgDGQi1 (ORCPT ); Tue, 7 Apr 2020 12:38:27 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:54014 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726883AbgDGQi1 (ORCPT ); Tue, 7 Apr 2020 12:38:27 -0400 Received: by mail-pj1-f68.google.com with SMTP id l36so980281pjb.3; Tue, 07 Apr 2020 09:38:26 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=AXe++Gaj8MpclyErhHCZ/ukAwMNv8mZXzgzntiJY7bo=; b=jWHL7xngdDxhsN3e0R4MNbAcNQhr+L38ZYjVXedBoy5UpSgF9c/Ui+Tqb32docYigg gVXi5fiZkZwzGQPx6pzm48G7dCdUd7Xaj7Dhcj7OCU++C/Ipdt01/IVhQqflcgjchAHn s1l2X8SscF8UKsqRHl6grN4bvshN1Bvfa5FyFZXoqF40r6g0O7VkqJV6woL4SXUGY8jS nibEqu7YnT6G6jVEchRPxlZvZMM0WsOam9IEtoouq/L9UPI6ATEW8HcezV8tQGmnOC2r Y3yWdnNbctPp4DSyREmihVKLVXJI5FTrYiOGcqSuevF/NWkaGEp+02ROZxiVy0GNoJIF aB+w== 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:mime-version:content-transfer-encoding; bh=AXe++Gaj8MpclyErhHCZ/ukAwMNv8mZXzgzntiJY7bo=; b=E5c3dhTY+tlSrleUmY9B3Nrsq1Y1OHpODFykNrR0BiPJ0H73q+zZz+bcrPMjfy40CP R3T6EHH4Vp1aYlYsNKVxFaN23HhTe7i45G6XnUpphsR3197fBwHyNQkCk4mFR6NgSu44 bsMAr20umMU/21l82sC6grP5qvipXGeZo/OJc9fHFTgI+SYx0mG/1e51JD01zChIFNNU LV+0nSCos9d3VSwearQ14P9D5jUHpUEnIxzE8SwP4VY8JtPm4mULncn3zGubSJhPGkw5 gCLX7MZfxyo6ap+22QZNdG4LL+K9dFp5Vc+r4OoWzNuoolZgKVF8DMfOOnVgDFPDsz8a qfYw== X-Gm-Message-State: AGi0PubB+CzkHfbsq4GmojgeZG0oW72ILMpLnU3cl1iYDowkd+OXs7TV LQg6sqha9fen4KCAcec/LEE= X-Google-Smtp-Source: APiQypIe9nJWfkaLt2AWVoPG2h+SPqBXLk9c+/bQCpohsA3wdtR1d/umhRO6cRTZgj4fJZioxuRKIg== X-Received: by 2002:a17:90a:ba93:: with SMTP id t19mr175971pjr.67.1586277506294; Tue, 07 Apr 2020 09:38:26 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id c62sm14153983pfc.136.2020.04.07.09.38.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:38:25 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 07/28] i2c: zx2967: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:20 +0800 Message-Id: <20200407163741.17615-8-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-zx2967.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-zx2967.c b/drivers/i2c/busses/i2c-zx2967.c index 5f3318559b8d..8db9519695a6 100644 --- a/drivers/i2c/busses/i2c-zx2967.c +++ b/drivers/i2c/busses/i2c-zx2967.c @@ -502,7 +502,6 @@ static int zx2967_i2c_probe(struct platform_device *pdev) { struct zx2967_i2c *i2c; void __iomem *reg_base; - struct resource *res; struct clk *clk; int ret; @@ -510,8 +509,7 @@ static int zx2967_i2c_probe(struct platform_device *pdev) if (!i2c) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - reg_base = devm_ioremap_resource(&pdev->dev, res); + reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg_base)) return PTR_ERR(reg_base); From patchwork Tue Apr 7 16:37:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F327C2BA1A for ; Tue, 7 Apr 2020 16:38:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E70D12072A for ; Tue, 7 Apr 2020 16:38:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YerLeUET" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727821AbgDGQik (ORCPT ); Tue, 7 Apr 2020 12:38:40 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:38567 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726883AbgDGQij (ORCPT ); Tue, 7 Apr 2020 12:38:39 -0400 Received: by mail-pj1-f68.google.com with SMTP id m15so984069pje.3; Tue, 07 Apr 2020 09:38:39 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=pWkgCfgMiFwGdm8O5EsKyk9rIhNdFIQ6tQrLzZ1db/w=; b=YerLeUETmQ2Q8iBEssSAA97Lied6/fRMHfrbPtgQ5c/t9BftHW0Ox8lGmfwhHwjhud YI+mjKznoR4oN2wncpURZpuzgs+YGUH6NOc30hFX3+C4d1mxs+oQHmwVY7KLwnsoqlyb kR0XGg9+VM729PDdiNTNVNgOsjQm9h938kl/xXoEfuwJAL3UU91iYLoooWjuQ+7g+oxm MaCBS1TO/opHaQFtFQVntRk0G7/f4kZSYdyWQKh9oy43iP6nIX7v3DHW8789RRle4DL3 Uds7U2Fu61vVXoPQUxi2hOk3nUHymMZkLU0SkOA5T3dyiIxG0cV9/Tc+umXCbCjlvAnT 9eTQ== 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:mime-version:content-transfer-encoding; bh=pWkgCfgMiFwGdm8O5EsKyk9rIhNdFIQ6tQrLzZ1db/w=; b=ON3v8+mtlPjayhmRQGyVy/DcWKjf0+VESJclMtra08FxvbUPtQaOmU4sFqtn/dO8KM ANw5QFpuqngv1Ah46Ye8DQzOznSw4nK7KkJfKmhiLJ/VoJO5PI1F4OxbXTF2RbI817DH LyZHYWnXDQsKTlSLW8pkCAD9C/gR8uKrsTiNhAtz0D+Uv9wvHcsdl4Eo53+lLlB+OuTG 2V5f3x8UPLyMtbOLn/2bfAPn7Fvcbn+p3ii2cR/oakToCayQdGmS0r3u3zIzht2hBbeP Nm7tSFuyVf0ZP+zBEZhShHtRukmr1uKPjVrMYSn0/ef6txWn80XCsq54suhDy+dHGCml fGbQ== X-Gm-Message-State: AGi0Puayuw9yteF+EKunr9e1l2dobqRaY7yu21kgHKAyOVPRy9QjgYpA UY0cOqG11dkJcc2KiF/nLus= X-Google-Smtp-Source: APiQypI6XZ7NwiFMKXlaDlRJ3AlAROQFG0WNP/mIwkKPmp/SPFdgtSQXLEirHrfAF82tI95K+3z45w== X-Received: by 2002:a17:90a:1f0b:: with SMTP id u11mr239042pja.18.1586277518843; Tue, 07 Apr 2020 09:38:38 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id b124sm14431301pfa.34.2020.04.07.09.38.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:38:38 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 10/28] i2c: synquacer: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:23 +0800 Message-Id: <20200407163741.17615-11-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-synquacer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c index 86026798b4f7..be389e95b57a 100644 --- a/drivers/i2c/busses/i2c-synquacer.c +++ b/drivers/i2c/busses/i2c-synquacer.c @@ -536,7 +536,6 @@ static const struct i2c_adapter synquacer_i2c_ops = { static int synquacer_i2c_probe(struct platform_device *pdev) { struct synquacer_i2c *i2c; - struct resource *r; u32 bus_speed; int ret; @@ -574,8 +573,7 @@ static int synquacer_i2c_probe(struct platform_device *pdev) return -EINVAL; } - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->base = devm_ioremap_resource(&pdev->dev, r); + i2c->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->base)) return PTR_ERR(i2c->base); From patchwork Tue Apr 7 16:37:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207732 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60C46C2BB55 for ; Tue, 7 Apr 2020 16:38:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 320D42076E for ; Tue, 7 Apr 2020 16:38:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ol450GSu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729008AbgDGQiu (ORCPT ); Tue, 7 Apr 2020 12:38:50 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:38572 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726910AbgDGQit (ORCPT ); Tue, 7 Apr 2020 12:38:49 -0400 Received: by mail-pj1-f66.google.com with SMTP id m15so984272pje.3; Tue, 07 Apr 2020 09:38:48 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=D5GzvKfRW7ZBOb1tB5z5fB2mwTysfR3jTFyi54tpUoo=; b=Ol450GSu45hQg5biQQuFtIwqt3HZvWJGGaX6iwdGKjIRC2Wenqz3BNCGQwIG5AgI0c WEe8oKMrZqUPYchYXX5WjVyki/NrYUL4AeXu/0FA4c7dw/A2LZrpvOMOkPECK+CLdcxM Lu6zvBWAofTEB4YYaq40E3/zsTKiDh2PhIfayx4ql6UCemdEywhtiUhhB24ZFUk2vdcK pliprMpAmMt6Q6SyW9L1FQIDz1mJ3thpoxuvsqyczJO3pYmhx6spd2ShuXTcKmMpb8Xu gladSln2PcM5Gkdt7gBqmL/BUYXkY8BnQaMpgG/mtUntWMw6STIT12kMIeXjKkghRKa6 4GJA== 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:mime-version:content-transfer-encoding; bh=D5GzvKfRW7ZBOb1tB5z5fB2mwTysfR3jTFyi54tpUoo=; b=Dq68hkQYrOEa55+zdp/tdq0gNVOH+eJPJoxkJ2Ks2lONGqem/IX9sXZw53fqDSEoeK 5IxGtAYp7MI6nwhNEyyWZRXAgkB/9xQJnAicDmLwab51/E/LzOVBc7f0ZKyPe/oLiwgS oy9U9YDarZZq2vENLlYrVYJLNUjniM+7bhSNK/l/BOgm9jHjskt3ZYzKzzfRkEhR/Ft2 En62YL7/r9EyLpmFNVryxzcWyGYSFUpPImvODObE6moPU/KQKI2sxHPveGoGejLAg85U ltcZFkaxfDJiUcYbOQDXZzNQTUCBVpTOd42x4eb/s1DY19Bq+YL3Y4JMxT1yIQ/grnic JunA== X-Gm-Message-State: AGi0PuZevCTwTDDwcAx8TGW+wJBaEQt5gZwfogIO8kdWUBAg98ssoMRQ XjpobY9DSLe3JlMvhfxcObI= X-Google-Smtp-Source: APiQypLxahLmhoC+qa4D8pSOpGeO3Bxcp7JqDS38Jg6wCNGknxhlPFVU39SjhlU32Q4vHKUzWySPuw== X-Received: by 2002:a17:90a:a484:: with SMTP id z4mr183369pjp.77.1586277528018; Tue, 07 Apr 2020 09:38:48 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id y123sm14186990pfb.13.2020.04.07.09.38.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:38:47 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 12/28] i2c: qup: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:25 +0800 Message-Id: <20200407163741.17615-13-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-qup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index 2d7dabe12723..940e9fcca8ec 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -1665,7 +1665,6 @@ static int qup_i2c_probe(struct platform_device *pdev) static const int blk_sizes[] = {4, 16, 32}; struct qup_i2c_dev *qup; unsigned long one_bit_t; - struct resource *res; u32 io_mode, hw_ver, size; int ret, fs_div, hs_div; u32 src_clk_freq = DEFAULT_SRC_CLK; @@ -1762,8 +1761,7 @@ static int qup_i2c_probe(struct platform_device *pdev) return -EINVAL; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - qup->base = devm_ioremap_resource(qup->dev, res); + qup->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(qup->base)) return PTR_ERR(qup->base); From patchwork Tue Apr 7 16:37:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207731 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FD5CC2BB55 for ; Tue, 7 Apr 2020 16:39:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7345420CC7 for ; Tue, 7 Apr 2020 16:39:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YfGvGoDT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729335AbgDGQjB (ORCPT ); Tue, 7 Apr 2020 12:39:01 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:32930 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729155AbgDGQjB (ORCPT ); Tue, 7 Apr 2020 12:39:01 -0400 Received: by mail-pl1-f193.google.com with SMTP id ay1so1461288plb.0; Tue, 07 Apr 2020 09:39:00 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=bFhSx68lYhYMPHE/ilJASIu7Ud5iM/KlgeOPWMIS3zU=; b=YfGvGoDTvYhJbVEsV0DgD/p4GLdxPgbU43ZnmHw4ZO3p7Dz+S3z5WvL1La4+z0OHJY GeEdANttmL49Q+qmB5E/J0J+nukFGQic+bvGqKnC03LnWnan5wzsGAu9fpj3ApWealeb eRkUAby/nkK6pJYTj6kuEB6OxOak+qErd12btCRJE88GoOtP6tO9q0xXtpKosM0CDV/U VqA8QBQ/Evn9W3VFRaKLlxDAsyPgKyYwB0qKbe4nWb8XytgOxntKGDMYr5aBm794byXI 1w/KK2ikbrjHghysdZTAVM/LrKH4TavB+LBiocHlzp20wcZ7rj0AAd0Ggwi5VkTEjsTG uXrg== 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:mime-version:content-transfer-encoding; bh=bFhSx68lYhYMPHE/ilJASIu7Ud5iM/KlgeOPWMIS3zU=; b=KFcJMAWJPnFFnLAwgGamCJ5IirC3fvrZWdkJYvEmjfNhpFZGk7/+qUuvhVy0Uixo48 ib25OeeH/9A7y/oihmFdY3Z4aXLpHFWozTsLQmR1QCRNnNEHvnb1cmLlaMMQVmw/OxWf 4QXbClEoNlLYIfRQm2prddV+oaKSazyv7lh43zZQvsCxir2ZoRNAvZNNhMJUKnCsYZEh nVMBqzZUbbPBLXJD+/d3F90VHJb39LK82ggVywpOBZb62H17oSNMA/SysZ9jUn/7r1Rz L7nX55o9/FkRIPWTGdKEfH3LeTThkw0twqMrbLHe5QehZk4nOcL6QX60O4wmrJtRRkH6 ppcQ== X-Gm-Message-State: AGi0PuaAr+8ORNTz7KwbVyTrO6a6M/n/tHnahdZ2JrCgNvl5hcpftxYz 1wLfCpI02fU0k5JCANyLSc0= X-Google-Smtp-Source: APiQypL/rbu5R3cJQ9fqui3wUek+97fQeQZZDtvCLr7B5mtzSlZoksmmp4ATj2V2kZP90ELtRvyBrA== X-Received: by 2002:a17:90a:c401:: with SMTP id i1mr159831pjt.131.1586277539955; Tue, 07 Apr 2020 09:38:59 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id a127sm14448769pfa.111.2020.04.07.09.38.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:38:59 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 15/28] i2c: emev2: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:28 +0800 Message-Id: <20200407163741.17615-16-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-emev2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-emev2.c b/drivers/i2c/busses/i2c-emev2.c index 959d4912ec0d..1a319352e51b 100644 --- a/drivers/i2c/busses/i2c-emev2.c +++ b/drivers/i2c/busses/i2c-emev2.c @@ -361,15 +361,13 @@ static const struct i2c_algorithm em_i2c_algo = { static int em_i2c_probe(struct platform_device *pdev) { struct em_i2c_device *priv; - struct resource *r; int ret; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, r); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); From patchwork Tue Apr 7 16:37:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AACEBC2BB55 for ; Tue, 7 Apr 2020 16:39:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 817E720CC7 for ; Tue, 7 Apr 2020 16:39:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p6l8fmT7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728232AbgDGQjF (ORCPT ); Tue, 7 Apr 2020 12:39:05 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34879 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbgDGQjF (ORCPT ); Tue, 7 Apr 2020 12:39:05 -0400 Received: by mail-pl1-f196.google.com with SMTP id c12so1454328plz.2; Tue, 07 Apr 2020 09:39:04 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=COoAuq3RN8WgiQF8XQrpXoF2QsJ0dC9sVNr9xVwXQk0=; b=p6l8fmT7ODsEzUttRgW+BI9wHrfF7FjDZJqG6ln9UDzowd4TdJzuRe8l03079RTuId 4x7O22ghuSAqqwygPhf5QivF4HmNISSiMtZ86676kVEuAm2+duswIkUqItFQV9NxcPws Bqwo74Bj2WcWTfm6IpUHbVTAyZusfn3HZfz7JPF/aLmO6fWJXpZ++WftXCMUiZg9pMSc tjjlGM9m2EJgWvCB2kMG7PWfRGJwJ5//fwJkN3dYWJzbageWFCvIwC65Zymxs1aAYHMw GIUHNYUua3wNlGne0CMIrPQ/USkf0rX9WcAcKJHkXRe4Bb3k2VK0OIdrXiT8KuPukhwd gnyQ== 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:mime-version:content-transfer-encoding; bh=COoAuq3RN8WgiQF8XQrpXoF2QsJ0dC9sVNr9xVwXQk0=; b=XxmJNVxuFCYuxSnUcWP1ghxbckmjArEkW9kghaCtue0rFr1N6YlaxB0scNYqwS5/eW X5JPYxhnTUm+ZPHaJ2EHcRNhZkAOfU9xEEun2TcREEuhxbG2beVcCAY/647O+ObCmC54 kSg81hLXMDc+fY52+gK0Z+FOl+/bPAZXxvt7d5y3zB1dPjEL77TimA2HjLt9oBO+RHQR BV/PrUwbOxpurrkowGWbvuR/X9BpM8txJ5/oxCSQmOMmsQTtVCp/RIS3ZUCer6ORSlV7 sVG6P7rbcTX+DAfjIE1gabWaT6UVZ+jHH7f3UJunI+3A0oq7tKywl5HPwmtVLUGtk65l 2Azw== X-Gm-Message-State: AGi0PubBJiYsuKl5kKbxD7xnv//vUylIoCt+Nspb8pEA6QAI2yeN/oYb jXNz6S2TJej+B9bLOh0vW7Q= X-Google-Smtp-Source: APiQypJxNR5pScUeaxX0ZrnCJcfZx0QMU8SHX/sSSERtLkLPHNSmXSmAdzXBo7HIsz4nqiGNIcS6GA== X-Received: by 2002:a17:90b:4d09:: with SMTP id mw9mr175593pjb.101.1586277544082; Tue, 07 Apr 2020 09:39:04 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id v5sm14372036pfn.105.2020.04.07.09.39.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:39:03 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 16/28] i2c: jz4780: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:29 +0800 Message-Id: <20200407163741.17615-17-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-jz4780.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c index b426fc956938..ba831df6661e 100644 --- a/drivers/i2c/busses/i2c-jz4780.c +++ b/drivers/i2c/busses/i2c-jz4780.c @@ -763,7 +763,6 @@ static int jz4780_i2c_probe(struct platform_device *pdev) int ret = 0; unsigned int clk_freq = 0; unsigned short tmp; - struct resource *r; struct jz4780_i2c *i2c; i2c = devm_kzalloc(&pdev->dev, sizeof(struct jz4780_i2c), GFP_KERNEL); @@ -787,8 +786,7 @@ static int jz4780_i2c_probe(struct platform_device *pdev) init_completion(&i2c->trans_waitq); spin_lock_init(&i2c->lock); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->iomem = devm_ioremap_resource(&pdev->dev, r); + i2c->iomem = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->iomem)) return PTR_ERR(i2c->iomem); From patchwork Tue Apr 7 16:37:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2233C2BB55 for ; Tue, 7 Apr 2020 16:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7762620768 for ; Tue, 7 Apr 2020 16:39:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F4I1imoD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728113AbgDGQjP (ORCPT ); Tue, 7 Apr 2020 12:39:15 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36884 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728359AbgDGQjO (ORCPT ); Tue, 7 Apr 2020 12:39:14 -0400 Received: by mail-pf1-f193.google.com with SMTP id u65so1051052pfb.4; Tue, 07 Apr 2020 09:39:13 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=6HmSkhu3FjCFzZaUxCM2aMgledh3iLP2doIQM+uvUtg=; b=F4I1imoDOWZKzGx9bPHVD53OWBbiP/Mf3QS2pdSp0owoey5hrLoninPoNAc5rqCLKk FMOqi+7J3BqYLgF+fgq68KwGlnZzuoig1Jfa6weMo+3AEO3/NRt76whyEP7zAHb6fJ5v ImOYPy4Iy9e+/hwgi6RkyvPFZEncstmUd1X1Epoeh+MybYllGXlfIHuySHJEAgSdiDlS BIDdqJw8bhcUVkVKX0vy3wTzltPLiivnZOOrHpt5CX168M9XEPp5cxHUgdsi8JOTPX6Z Sm28U21AyeuwDh1pZfSKGQqQvda06ukD/KImB3q7uD36v7VgH4Vw2ggYKXth4rc6OMag HYRw== 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:mime-version:content-transfer-encoding; bh=6HmSkhu3FjCFzZaUxCM2aMgledh3iLP2doIQM+uvUtg=; b=r2PQIbNKoBYM9xRsfqTPKAX/QKzdyHpEbF5TWOH42u6vRxtNYGZ69/V5r3ql9SfE9e f0z7Fa1VKYigWh4a9047w1O8buHNFqi1jP+I/miOuaMYYa92CxYAlUpmZJ1N3V+fuEDS FH9CB1JZfcsMr94UzsiqfzM0VpcXur5cYzud6OEQ5TkZjdbSvLUiIjdUs55LOrEn89QO VmFwbeNvEZoOJrIXXpPw909LEK14js4igjukESsv8//H7KLPclzcko8HHD7WGfc0HFde EOfxmDIA4X7AzAvAu6AvJud2PLzYKqLQd7Ef6usoQZpFbQPWIl8LJ9PQgB//q6v93TJI puNw== X-Gm-Message-State: AGi0PuaGnfpQeMQacqJsiyQP+bh+LJhZ5CuB16YwCNxDWEOJrfzTNl5A zRvo/DWVU0OagVxXjYsAgYA= X-Google-Smtp-Source: APiQypI6zZKeIBD+nhMTtHximiswwVlPcVyJyfpDphCHNwXtYNIaUnJphZ9Re3U32RM9OfOrgW0Vjw== X-Received: by 2002:a62:e20c:: with SMTP id a12mr3454657pfi.37.1586277553321; Tue, 07 Apr 2020 09:39:13 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id a75sm2002866pje.31.2020.04.07.09.39.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:39:12 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 18/28] i2c: axxia: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:31 +0800 Message-Id: <20200407163741.17615-19-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-axxia.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c index 0214daa913ff..0aa0753e2430 100644 --- a/drivers/i2c/busses/i2c-axxia.c +++ b/drivers/i2c/busses/i2c-axxia.c @@ -734,7 +734,6 @@ static int axxia_i2c_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct axxia_i2c_dev *idev = NULL; - struct resource *res; void __iomem *base; int ret = 0; @@ -742,8 +741,7 @@ static int axxia_i2c_probe(struct platform_device *pdev) if (!idev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); From patchwork Tue Apr 7 16:37:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207728 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDEABC2BA1A for ; Tue, 7 Apr 2020 16:39:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C282920768 for ; Tue, 7 Apr 2020 16:39:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="n10Sawsz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728421AbgDGQj2 (ORCPT ); Tue, 7 Apr 2020 12:39:28 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36794 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729494AbgDGQj1 (ORCPT ); Tue, 7 Apr 2020 12:39:27 -0400 Received: by mail-pg1-f195.google.com with SMTP id c23so1989924pgj.3; Tue, 07 Apr 2020 09:39:26 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=1tQajpkRbdeArZlQb21qGS0qf7y46zpGYXWar0lXtp8=; b=n10Sawszo/o9eKwpunK3EGx+yhXZp2Bb6Q9MtiGzBoq/LFT2u+tkCgrs4Epaos0+eG k3OSvGvMrt9yYuSNADbOhI/m3KsmHd+ckw9G4fj56GKHqpubiLvgSxChLuLFWZYtIC2r 4T+19BzWDbTLCl6YEeYEf+JXHT98+ecihepC6SZKPBUSf9Q0lqQdijKbq7BiEKVmzlYU HNPnlIB1N8QRZZ1uOVCWD7KA4S5OPrdd+CjWtZDI/eonwi1Cl/thFcSSVJ5bbiELJpkg nXH1R1bqmZuNwV6JBwl5iVW7HWoO/cfje4xE8G+7dHcTpVnJSwvEBgIwafVfcrxrmDGy HUUw== 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:mime-version:content-transfer-encoding; bh=1tQajpkRbdeArZlQb21qGS0qf7y46zpGYXWar0lXtp8=; b=dYmakwdfUIX6hGbzINTKV7CpdM0KVQ3d/OWEjaHokiDcOO6ou8lcV/vrFMgS2YzJX0 wNd2cU1Sd7I5NRPClOgh+nAGqcz1EhWHCn9ZvSLL+YB4RNPK89gH1BW2U3jlE0HWnZrD ItM4t803D8FTLbkRvAakr60VIRbHYkLHZxOMjH+A6mdR27lXJeOoO8VdMRkMTfK/0xYg Po1CtcOgLa9Is2jwh7YSqnh93uwRBXlp4XR6Aad3X8aSmEERfvmMyiczJ/P0I2hy1WFs 9H75ztQbsxnayMu+FaqSJjvv2JrchMiZumFVNIKEblVkl66yWbBleWD6Q3kusnFsjxNK ywfQ== X-Gm-Message-State: AGi0PuYV62XS4LujHPG0y7v3Ta3JZsa9hurfmnsTYPmtnaZqSOyrchPK xUaZYJCeD94zjNZgurgmgj8= X-Google-Smtp-Source: APiQypIpvmXKcGjt41qLytPvGhaEbgnwWMFJRIahFj/ULYS29TkAx35qcnnFrVQc4UUgY1iSfAIN0w== X-Received: by 2002:aa7:8283:: with SMTP id s3mr3420243pfm.230.1586277565915; Tue, 07 Apr 2020 09:39:25 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id l8sm3366721pga.81.2020.04.07.09.39.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:39:25 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 21/28] i2c: digicolor: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:34 +0800 Message-Id: <20200407163741.17615-22-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-digicolor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c index 3adf72540db1..c199ed3334f9 100644 --- a/drivers/i2c/busses/i2c-digicolor.c +++ b/drivers/i2c/busses/i2c-digicolor.c @@ -291,7 +291,6 @@ static int dc_i2c_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct dc_i2c *i2c; - struct resource *r; int ret = 0, irq; i2c = devm_kzalloc(&pdev->dev, sizeof(struct dc_i2c), GFP_KERNEL); @@ -312,8 +311,7 @@ static int dc_i2c_probe(struct platform_device *pdev) if (IS_ERR(i2c->clk)) return PTR_ERR(i2c->clk); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->regs = devm_ioremap_resource(&pdev->dev, r); + i2c->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->regs)) return PTR_ERR(i2c->regs); From patchwork Tue Apr 7 16:37:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207727 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8870C2BA1A for ; Tue, 7 Apr 2020 16:39:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B0B520719 for ; Tue, 7 Apr 2020 16:39:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rdsJRnTK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729537AbgDGQjg (ORCPT ); Tue, 7 Apr 2020 12:39:36 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:36526 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727235AbgDGQjf (ORCPT ); Tue, 7 Apr 2020 12:39:35 -0400 Received: by mail-pl1-f196.google.com with SMTP id g2so1449942plo.3; Tue, 07 Apr 2020 09:39:35 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=Na+MBxK/KB5LpeIWE2GukXhRC2p8is3PfN4u2dPnbGo=; b=rdsJRnTKj85CIzP6I0/OF6RGyGGXkHpG0eEx8qzCx4tK5g6J9O537QQ51HR+kfraoP yw2yeg6nYu4A9Tp++y0lRkRdzoVQaJM7+C2IeMhB1Z17tEdhy4KMy/8BQSjBLn1SGxJd KEzl5X1SpdtGE21LnXC904BdS9JeBoYkAKzKDf1LI1LX3Y0hN7rWSoxvSEKzHiA7LAxi AGIM4acZC9MOxfJb4POWH8dk9sHdPuzRF5ep9NsmYRX5YAxjDIV1wLQV6A45qYWtQht0 RnBGrLAQ3Zx/DZiQXwXuPYUSe42yaviFrvhgfGnrpao7F2E/ixJyaNMY3lukXfb508SM KtLQ== 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:mime-version:content-transfer-encoding; bh=Na+MBxK/KB5LpeIWE2GukXhRC2p8is3PfN4u2dPnbGo=; b=SbczzFTKvwIXfL0CdXZdIPTOP1YO+uaIOef6/jNrJ80z1QufV71iK8NG08P/Ylg1Iw 1+rOScuKY1s3LO1rQxONZ3TECo0wj0L49ZJxYJZBZ4K1JktV389QRSBHJvjk93rlB42M X0fOy/jLHGpUVk8Nxa0eoNU7REpLCgt1pdUVCYxZ9tpU2cpbFFopFy746pPB9b6+4/uc f1HcjKDhJaiK+/TiAD4i4q7W1q9XV4CR/r5N2u40v8a48gehT6qbp4+dN+ZFKSlBVv5o nfxpKBjNrBzt4JQ4eVS7cAbyhQt9kKbhMmnW7zF3JiRe4sxQxDeDhEM5SYJ9otAtfB5k m4zw== X-Gm-Message-State: AGi0PuaUTAj+bR3ktgmST2uvm4ThhdXxDRtNEPHGtKuTL6uYRIsx2O03 fdtrFdJut3Gm/S32dSGOTbY= X-Google-Smtp-Source: APiQypLjYFN0D/M16a9RV7IXhhfiacD3u6Jv2Cbu/4Gxm1c0uvBn9cRcGFwJbQRU5zOmM3/sCJQRhw== X-Received: by 2002:a17:902:b591:: with SMTP id a17mr3156573pls.283.1586277574594; Tue, 07 Apr 2020 09:39:34 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id c9sm3083749pfj.214.2020.04.07.09.39.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:39:34 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 23/28] i2c: sirf: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:36 +0800 Message-Id: <20200407163741.17615-24-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-sirf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c index fb7a046b3226..269a71b0ee7f 100644 --- a/drivers/i2c/busses/i2c-sirf.c +++ b/drivers/i2c/busses/i2c-sirf.c @@ -272,7 +272,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev) { struct sirfsoc_i2c *siic; struct i2c_adapter *adap; - struct resource *mem_res; struct clk *clk; int bitrate; int ctrl_speed; @@ -310,8 +309,7 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev) adap = &siic->adapter; adap->class = I2C_CLASS_DEPRECATED; - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - siic->base = devm_ioremap_resource(&pdev->dev, mem_res); + siic->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(siic->base)) { err = PTR_ERR(siic->base); goto out; From patchwork Tue Apr 7 16:37:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207726 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30A67C2BA80 for ; Tue, 7 Apr 2020 16:39:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 052D52072A for ; Tue, 7 Apr 2020 16:39:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XnAei8ls" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729557AbgDGQjo (ORCPT ); Tue, 7 Apr 2020 12:39:44 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:33593 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728494AbgDGQjo (ORCPT ); Tue, 7 Apr 2020 12:39:44 -0400 Received: by mail-pg1-f195.google.com with SMTP id d17so1996269pgo.0; Tue, 07 Apr 2020 09:39:43 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=YU2vTvD7/lZm/87Z2CKVZciCXF20+w/1PWpHraQ16/E=; b=XnAei8ls9JV+0DT1W8p2dHqgCBoF/Mbw3U4OmpW5hPCJUaUqIU7pt3W6NY7Ie63e1N YILL1CXek48oQHTAuxtodgk/ngIFCgb1im9FEXg8WvfKyL0aS/SqrwWbzM/5YYQzBK52 mSvvIzJkwSwqLSw7bs8tWEYnY8nhOC2vrKLueWd1RGIzYK7IY8Q7yQJkgk7KsClDU556 dwvWke98+7Aqwi2p9lfsPgIjnUzilOWEGZtDfhsuMdJW13Tjsvv5SpbxaJ69E4q7JBHS AiHQE6zI/k75nGNcKrP+9Cb4l7w1rQ+ifmQSqLtyWxS1TWA5cC6z9QknElJnw95QV8XE cerQ== 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:mime-version:content-transfer-encoding; bh=YU2vTvD7/lZm/87Z2CKVZciCXF20+w/1PWpHraQ16/E=; b=KcCdALA6/1EGzM6EMJvnzxNKihlwTKd2t3iCpLKhgsH+zo89cXnyI/hQLc4a5mOIbb OdcEZPLKC6+z49TY9REIGCNSdZ6O/iYCrKWWCIQ+5mnDOezde5mObHWAxmWRSogRnl9c WXuAq0snyaAam+aNAEmM1pYmERGwyEsUSZgVb/wrgkIMe1j/7lwjM1upgBvTJfGyhdyX wXLCOI4R+fiDnt3PE4c50nf2koLL643cGhNtRjASm/PH2nB9Mk0Y7QQTBPg2JlSNQRhu luPyv9UWR24WUoejqlirZXdeJnLLeXBQL6uP73Jny2Ux9CcrKc3D6YIpzT3pvdtScjTy KnvA== X-Gm-Message-State: AGi0PubAZyEJQS8U69TQZhlBgBMQ1hLQ1bLw3Oe1AdtcZXmUA2sQbTqg EJG02/JlNqbJSXdSrsF3vtw= X-Google-Smtp-Source: APiQypKNl0zM+fvfb72fdDQ4gtDTSPog/Rg3oeZ/8mJ8OvJpldnUoAecxMC3o17SYSdQYz/32rfyaA== X-Received: by 2002:a63:7a4f:: with SMTP id j15mr2858299pgn.45.1586277582927; Tue, 07 Apr 2020 09:39:42 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id 13sm14418909pfn.131.2020.04.07.09.39.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:39:42 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 25/28] i2c: sun6i-p2wi: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:38 +0800 Message-Id: <20200407163741.17615-26-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-sun6i-p2wi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c index 7c07ce116e38..cb78c38ea3a6 100644 --- a/drivers/i2c/busses/i2c-sun6i-p2wi.c +++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c @@ -187,7 +187,6 @@ static int p2wi_probe(struct platform_device *pdev) struct device_node *childnp; unsigned long parent_clk_freq; u32 clk_freq = 100000; - struct resource *r; struct p2wi *p2wi; u32 slave_addr; int clk_div; @@ -231,8 +230,7 @@ static int p2wi_probe(struct platform_device *pdev) p2wi->slave_addr = slave_addr; } - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - p2wi->regs = devm_ioremap_resource(dev, r); + p2wi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(p2wi->regs)) return PTR_ERR(p2wi->regs); From patchwork Tue Apr 7 16:37:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C905C2BA1A for ; Tue, 7 Apr 2020 16:40:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4A322076E for ; Tue, 7 Apr 2020 16:40:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eN291863" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729601AbgDGQj7 (ORCPT ); Tue, 7 Apr 2020 12:39:59 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36835 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729590AbgDGQjz (ORCPT ); Tue, 7 Apr 2020 12:39:55 -0400 Received: by mail-pg1-f193.google.com with SMTP id c23so1990503pgj.3; Tue, 07 Apr 2020 09:39:52 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=CtTj93RT22AUoZFV9c4kVk/vjcjiuKnw2EdzUfQTZt0=; b=eN291863ill/D0ps7cEyICwH2C1xq0YcJ48Bn98XNA7sHeKK/iXZfeuHToctcHrTA4 P/lbHG9H6B3+7/6sHWt6AZ4ZmF4n0N2HS40kYqv8FDW976EXlzT8nxHcKTnWZY7GS4RX QT3MTTfYCU6a1SE6ii09dqc9dLSRvVtCNIawV225JBhtHOvwWCfu8FpfDtRsSsSOTqf7 Md2Q3WzJY+OteJkmY9lle9z32yWPOYVYlH0AfUTKF3SKaZrR5AY2e3Q2THZ4lNrb322x bb24qsRVvaeusVbkkz+VJrs7qvHnQ6ou9OwnfvuDXHjADL/nfBhW/5A1P3EMIskIVETN tIVw== 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:mime-version:content-transfer-encoding; bh=CtTj93RT22AUoZFV9c4kVk/vjcjiuKnw2EdzUfQTZt0=; b=cVhIOZGB/hCNGl7xxkhSAY6WOVfpzCd4NEgTI4YCL90bcQFpPE3M/O4+B4SLWr9lca Ul6XUBYSvRZkqs5cjFU4j6Jcy4nU5Z9uEfr5OE1JuwEGaTaui+D0D6EZomIYkm6XVv8W 60uZ45igvKMqkFvThkd30B3SkZ0H+BuCLKE2DFe/6T6jD/ZO+GvoZbG7HfCiMRU/oQHP z6DJDSO23qdgOZrwzBgEpCePPIvotq7bubct6O3nzbOO/7Ce3H9bth1a07efCNnONvd/ 9VYXRtPdKhrJ4xosI+DPo2FYacNwk7GpTl8p6Sbi2SlS/+1rHIXsgyzsQ4h+LVu35d4y s2tQ== X-Gm-Message-State: AGi0PuaDWW/IOxb6mL4dIRHNFnbws5EmSRi20U6hB+9D3OoUOiLufTTk qacCd5765oxUl2dO4eIFHBc= X-Google-Smtp-Source: APiQypKgOgO87V/3IVFebGYD+dbDYVB4T5zd/xMsEgAziL9EiEf/0Ygg8/A0Kh1FwHIJxJw5Jufk2w== X-Received: by 2002:a62:154:: with SMTP id 81mr3308259pfb.228.1586277592492; Tue, 07 Apr 2020 09:39:52 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id mq18sm2292956pjb.6.2020.04.07.09.39.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 09:39:52 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsekhar@ti.com, bgolaszewski@baylibre.com, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, baruch@tkos.co.il, wsa+renesas@sang-engineering.com, kgene@kernel.org, krzk@kernel.org, paul@crapouillou.net, vz@mleia.com, khilman@baylibre.com, matthias.bgg@gmail.com, gregory.clement@bootlin.com, rrichter@marvell.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, baohua@kernel.org, linus.walleij@linaro.org, mripard@kernel.org, wens@csie.org, ardb@kernel.org, michal.simek@xilinx.com, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, rayagonda.kokatanur@broadcom.com, lori.hikichi@broadcom.com, nishkadg.linux@gmail.com, kstewart@linuxfoundation.org, allison@lohutok.net, gregkh@linuxfoundation.org, tglx@linutronix.de, bigeasy@linutronix.de, info@metux.net, hslester96@gmail.com, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, qii.wang@mediatek.com, drinkcat@chromium.org, hsinyi@chromium.org, fparent@baylibre.com, opensource@jilayne.com, swinslow@gmail.com, linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dejin Zheng Subject: [PATCH v1 27/28] i2c: bcm-kona: convert to devm_platform_ioremap_resource Date: Wed, 8 Apr 2020 00:37:40 +0800 Message-Id: <20200407163741.17615-28-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200407163741.17615-1-zhengdejin5@gmail.com> References: <20200407163741.17615-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource and devm_ioremap_resource. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-bcm-kona.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c index 4e489a9d16fb..2bde3b5bad04 100644 --- a/drivers/i2c/busses/i2c-bcm-kona.c +++ b/drivers/i2c/busses/i2c-bcm-kona.c @@ -750,7 +750,6 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev) int rc = 0; struct bcm_kona_i2c_dev *dev; struct i2c_adapter *adap; - struct resource *iomem; /* Allocate memory for private data structure */ dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); @@ -762,8 +761,7 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev) init_completion(&dev->done); /* Map hardware registers */ - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dev->base = devm_ioremap_resource(dev->device, iomem); + dev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->base)) return -ENOMEM;