From patchwork Wed Apr 8 18:22:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207721 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 A7D06C2D0F4 for ; Wed, 8 Apr 2020 18:23:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F9C420753 for ; Wed, 8 Apr 2020 18:23:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kBEAOUGy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730685AbgDHSXd (ORCPT ); Wed, 8 Apr 2020 14:23:33 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39864 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729672AbgDHSXd (ORCPT ); Wed, 8 Apr 2020 14:23:33 -0400 Received: by mail-pf1-f195.google.com with SMTP id k15so2789742pfh.6; Wed, 08 Apr 2020 11:23:32 -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=+80RyxbCn8tz5y0Vc+EWXEDgsPcBxti5SpsxZgdpFyg=; b=kBEAOUGyDbUMCiaOMxXLVHOCxuTFkUbc9Vk+PZA1wT6uRgdcOu4yZ5W3VtNCV8eEEd clMgpf93NBja5y6HCSHQ8IBQw6iH+KsXEoZa6SIubGcLEW9cewGBX35Y2pcwPbWpIq6E 1A+y9jt2UCsfRLRayBa3fbw2m3MiE9aswkyvfWVWk3HJnIB6oGZVA3ko71BKk0hydChu bTc8I/3JVUUwzXD+EhmTdLGJ3Ad92jENtLMPFBtkhn4pYAeWSnzLOcj+8Bt++O5AWS1h j61wytooRVFI6ZUYAbm5m1M14SWW80hFuU1N7lEI92HSL8HtvOqG3bj9o+UgX/7IPNrM VzTA== 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=+80RyxbCn8tz5y0Vc+EWXEDgsPcBxti5SpsxZgdpFyg=; b=EjIQYLbbUKI5T2SQbtEZKXAmLVnBO/r6fD1vQQ11ZK4JMBHiN5ARhz6MidLGraALgY yYHJTnVaU6qxvThfaUcmYRhPzBVhMiu/Vxoc9e6kkgZ8BoFekNAx9QPch37jQ9gzIQ5y 3lxEpC+FWg6Se+owvMmYqA4ZeFAVodri85lfftQ63G/r3TaS6KlOkLWrpdoqhu6t5ZOe UoLdl/GVdeW+I11/qFG+c2bqeHL6tcgoccQPLSsSaRKObHV+WH0Thziv2YbwUL3GHMLQ FH6X039YdEW1a44IFUOGvDLnP2SA5LIdj2c3QVTUDjU5+nhA5g9XFlXB2Z/HtZbAl36f CpFg== X-Gm-Message-State: AGi0PuZJ/cZMltgojZjYjFxue3g8fqGv6GKFKhJTjGnSIv6uv90TTUJ0 hlwGoCH8H08d11ArdUlEfqY= X-Google-Smtp-Source: APiQypKUWwHU9zimuwReZlfre05QmJd1ik0rC/sbJJXmYJu+6pwOlBwnBPGRKyg110iwdy6lP5ta+A== X-Received: by 2002:aa7:947d:: with SMTP id t29mr8595169pfq.184.1586370212220; Wed, 08 Apr 2020 11:23:32 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id i124sm17119875pfg.14.2020.04.08.11.23.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:23:31 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 02/24] i2c: mv64xxx: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:22:49 +0800 Message-Id: <20200408182311.26869-3-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed drivers/i2c/busses/i2c-mv64xxx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index febb7c7ea72b..62fb1ecc84a2 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -877,7 +877,6 @@ mv64xxx_i2c_probe(struct platform_device *pd) { struct mv64xxx_i2c_data *drv_data; struct mv64xxx_i2c_pdata *pdata = dev_get_platdata(&pd->dev); - struct resource *r; int rc; if ((!pdata && !pd->dev.of_node)) @@ -888,8 +887,7 @@ mv64xxx_i2c_probe(struct platform_device *pd) if (!drv_data) return -ENOMEM; - r = platform_get_resource(pd, IORESOURCE_MEM, 0); - drv_data->reg_base = devm_ioremap_resource(&pd->dev, r); + drv_data->reg_base = devm_platform_ioremap_resource(pd, 0); if (IS_ERR(drv_data->reg_base)) return PTR_ERR(drv_data->reg_base); From patchwork Wed Apr 8 18:22:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207720 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 F3F15C2BB1D for ; Wed, 8 Apr 2020 18:23:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C9D2721556 for ; Wed, 8 Apr 2020 18:23:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PLGSVqw8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730715AbgDHSXm (ORCPT ); Wed, 8 Apr 2020 14:23:42 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36953 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730703AbgDHSXl (ORCPT ); Wed, 8 Apr 2020 14:23:41 -0400 Received: by mail-pg1-f195.google.com with SMTP id r4so3692983pgg.4; Wed, 08 Apr 2020 11:23:40 -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=D/XeRamXX05QkrU1HvrtG2EIwwlHeRpQdFdQJ6tbj1M=; b=PLGSVqw8wT4ESTAFPnNYOeNc5QJtTsIgt0K/8qVZWbfDBtPLvOYsip7yM5E1tB5c/c MEQ+xRu27k/1rbz8CY7Ozk/UKSrZ0MdfeMepFX/cnRC/8CwH/PD6t3XT9wkvLBadsFhm gvGpbf9u+d5JBA8yCv/y6eHcEAjsXtLUMnpk8j02Uy1R0TF/DOLBrY8hhGvBmoeYqEAe shXOvmxw0pVsmpQ3T0Oz1H0oa9LFaRECk/WqEqVGMnTIKwl2E5mQuI2DVEzIuJNZ4wRD IVmiKX1Jy5MU2IAPK1RUgggP8mE/BGC8eMxtKyCQeyBWyO/tJ6tpeSb3leSQUtt3dVCY OWxA== 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=D/XeRamXX05QkrU1HvrtG2EIwwlHeRpQdFdQJ6tbj1M=; b=uTlV3zL/JryRGA6I/7QHOTXFhJXyUiIoLimGzaIlOTnLmKqWRW4g+y/phfUdiEcgZC Fdm0y3U3oqL/RLAh7RTsKWhl/Sz+kHPuCGqab3brc3JVvlq51kQo5a00JkmP4a2rUYi1 xmBoFUZF8wVR4mPoRfNyFNbEbWGricivPiIchDWSnks1dSgk0Vr56pq10nf6/9ay1R6J SfkuJfEmBGkpz5hzN7jXxLf3ATCnXXkkGptkQCFlVtITTV1L2pYA+r1ZtyK6tLP1msuh 79W3Odw+X9bzY1P/fwOPmaudfGwhwzYgOEOIC83giT13bNCuPvCRMwMcBW9YCiTV/uFE F0qA== X-Gm-Message-State: AGi0PuYMEW4wKMkm8cC+8qDJVqfpzukX6+nKlmjlzN8BcM0F8pyvli47 Kdrc5GB6jVG+rB1n64qJmCQ= X-Google-Smtp-Source: APiQypLHTyeRyOIDK0sluDNU/T9F3T+UyUwb8gC/ARSclHZhd1prFrgrYdqvWHps3DzaUaCLwUxj3A== X-Received: by 2002:aa7:8283:: with SMTP id s3mr9140434pfm.230.1586370220264; Wed, 08 Apr 2020 11:23:40 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id ne16sm211745pjb.11.2020.04.08.11.23.39 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:23:39 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 04/24] i2c: exynos5: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:22:51 +0800 Message-Id: <20200408182311.26869-5-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed drivers/i2c/busses/i2c-exynos5.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index e7514c16b756..5bf716df88f4 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -740,7 +740,6 @@ static int exynos5_i2c_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct exynos5_i2c *i2c; - struct resource *mem; int ret; i2c = devm_kzalloc(&pdev->dev, sizeof(struct exynos5_i2c), GFP_KERNEL); @@ -766,8 +765,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev) if (ret) return ret; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->regs = devm_ioremap_resource(&pdev->dev, mem); + i2c->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->regs)) { ret = PTR_ERR(i2c->regs); goto err_clk; From patchwork Wed Apr 8 18:22:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207719 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 67A4AC2BA1A for ; Wed, 8 Apr 2020 18:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F96C20768 for ; Wed, 8 Apr 2020 18:23:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LMJvqQGj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730755AbgDHSXu (ORCPT ); Wed, 8 Apr 2020 14:23:50 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36288 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730751AbgDHSXu (ORCPT ); Wed, 8 Apr 2020 14:23:50 -0400 Received: by mail-pg1-f193.google.com with SMTP id c23so3700317pgj.3; Wed, 08 Apr 2020 11:23:49 -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=X0zRSaYXjzcJ9Hlrze4BqCSrCRRxSAkZlA9nRwyv1rA=; b=LMJvqQGjhqBUN/o2zZj5bwYDy9Yj6om9QDHH9O7rbVbgJOO9zioDyq0hf/HluAmH0/ KDYoBf3oPT/JYVMx5oFtYIjAru1zbd44ModZ5k53kh4QfdYBGDwQ7sDrpsemxa9bQAYh Ua14qXYITLcj1sSRQgFGb2UXIrEAlPSCxUAvDMrMHAR7y1X24oCmRPKFpT31b9RmR+93 3ZEG8chFxnbMqc88bkdroM3drxGvzmx+lARYXe/dcsNU6t7IuW15+cbbM26qIobgp+8Z Wyz64FTh2hGngR3Z9+S+JVlCmsE1MDiCVjbXY22vFB0BLvMnyYI2DzuMMp7z8qNnO6uD qa8Q== 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=X0zRSaYXjzcJ9Hlrze4BqCSrCRRxSAkZlA9nRwyv1rA=; b=LKnAQnQXQjVukHmrN1AlayQ3YKQYoOj9Bv09A3iHpfIv0CRDu/f7AdO53hcvA8hAbJ ZhOrQBHMY6jJD7X4xcMCBuj1hGIFUZ0dg6VANaoOQHCZfWg9ChpCE5dgAdM4MvqiKF9o AagBX/D+5znj1HmjX5AA+dHsZZslDQuZx8Omj6NXdxv84fkhyhwZIkV3qJm6IUUUMsOa 982duCLi61X1P2Fgb9ZhzxkoHCs89Frslf1YApRXwr3zxnAr06c4/fGahjVxZSqGK/N3 RuxG4Wyvt3BzqSbDoKSaMnKN1VjFHT4IOg5k58EcF19qAoMW+H01/LoQH3p0VnPtWM1r M9hQ== X-Gm-Message-State: AGi0PubbdKr7m4asjofwEiK0HXHa90WaOiF+S3maiyhv3ubd6DC12a6Z ie0zn8te0jADAbvSCwIML5k= X-Google-Smtp-Source: APiQypJSKipLCRXs7PSE2qrjqRx0zT2oPBc0yNX/TLwG6sPMeYKY5+AX+MpapIxMD8D5o5EJKbzL1Q== X-Received: by 2002:a62:5a03:: with SMTP id o3mr8838343pfb.301.1586370228956; Wed, 08 Apr 2020 11:23:48 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id w15sm17158523pfj.28.2020.04.08.11.23.47 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:23:48 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 06/24] i2c: xlp9xx: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:22:53 +0800 Message-Id: <20200408182311.26869-7-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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. Acked-by: Robert Richter Signed-off-by: Dejin Zheng --- v1 -> v2: - no changed and thanks for Robert's review. drivers/i2c/busses/i2c-xlp9xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-xlp9xx.c b/drivers/i2c/busses/i2c-xlp9xx.c index 8a873975cf12..beb2bb6905d6 100644 --- a/drivers/i2c/busses/i2c-xlp9xx.c +++ b/drivers/i2c/busses/i2c-xlp9xx.c @@ -504,15 +504,13 @@ static int xlp9xx_i2c_smbus_setup(struct xlp9xx_i2c_dev *priv, static int xlp9xx_i2c_probe(struct platform_device *pdev) { struct xlp9xx_i2c_dev *priv; - struct resource *res; int err = 0; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); From patchwork Wed Apr 8 18:22:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207718 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 49656C2D0F4 for ; Wed, 8 Apr 2020 18:24:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E56820771 for ; Wed, 8 Apr 2020 18:24:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XJMeMnAM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729627AbgDHSYC (ORCPT ); Wed, 8 Apr 2020 14:24:02 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38444 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729702AbgDHSYB (ORCPT ); Wed, 8 Apr 2020 14:24:01 -0400 Received: by mail-pl1-f196.google.com with SMTP id w3so2815690plz.5; Wed, 08 Apr 2020 11:24:01 -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=lkpS6QNa7cbHMSUzBvyu57zDrxRlz++kSAez7ECVngE=; b=XJMeMnAM0rP0yUuHh4yNg322Hgp5TLUrtDCeOFJtIpWw+/7uyuAc9ntowzbLAm9ns6 n81EWaXngzghXNeQnM3wGHT+0Q1rXSrhjVwTaHiIt02QZjzIu07VhqS0gIC/Nxf0V8yO 7ix5/1/0DLcGvmQrpF6wTX3pGTQGbSoBc/yXrYWY0UTNn6zlCP/zd6mATn7P0LNsIAPR REg4Tnle/zrz4SIIi46Uu7CBmVtI045e64Yl1STTRKXnMuN/wf+ThdMZlLt0/f9MCKdr bIv+IGDwk5RUwmjDt5SvVlr5T+7hmfyuTvQX/Nj/ev9PEx473uiathS8ENE1jdf73kSa t9ww== 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=lkpS6QNa7cbHMSUzBvyu57zDrxRlz++kSAez7ECVngE=; b=d0LYyeGTmbCtSFuIceLujzEpZpa2ZIzYblCpA75ThbUwppJ0w7h2b/a5TWipBRHyD/ dOcl5lCxZQBU4UdAcgnvIh7HZCbkILfu8VQ2qw3D1zxXqtQFd5es0aK4vIxqLpkdT22F KvSS1Mzijt1pJmDsVUVIkPtSf8X6BYODMUAw6hTt1Ndv7MylFytPyD5Vqm2UWUjed0ho 5ty0BJgrqIhpxuToKbb7qqm5PsxqTOl3oa0NupF9el2dXRJ1yGpvYZCzbZehBIPyroMD S/I0hajK4GA0JjuhsqYEiTCylEw6MfBZsUkSk+q9yMjxUAf9eziUutLG2NLe43e8SJG9 CRog== X-Gm-Message-State: AGi0PubUbY2dwPOR/9831RWauh1RPhl+AlLqXwFXeDeDkzhOHash72Xl QwmiTABxQHYpi4ok2NKHn9s= X-Google-Smtp-Source: APiQypIeb5Li1Za27ifDFVosm3DJ81DLUvhgnhPJUDkQk0EHngILm3m5aFnOmP+SQIsfLYQhZvdmbA== X-Received: by 2002:a17:90a:898d:: with SMTP id v13mr7271426pjn.12.1586370240654; Wed, 08 Apr 2020 11:24:00 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id x75sm17374134pfc.161.2020.04.08.11.23.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:00 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 09/24] i2c: qup: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:22:56 +0800 Message-Id: <20200408182311.26869-10-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed 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 Wed Apr 8 18:22:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207717 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 F35C2C2D0F4 for ; Wed, 8 Apr 2020 18:24:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C80F720771 for ; Wed, 8 Apr 2020 18:24:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jriGEKpL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730787AbgDHSYG (ORCPT ); Wed, 8 Apr 2020 14:24:06 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:53004 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730786AbgDHSYF (ORCPT ); Wed, 8 Apr 2020 14:24:05 -0400 Received: by mail-pj1-f67.google.com with SMTP id ng8so171074pjb.2; Wed, 08 Apr 2020 11:24: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=Nlrvf8fp2U9OGb1ZIrjNCK2BX6Ii8V5yANnwk2DM7Vc=; b=jriGEKpLWui7b2XvpGCs2adK+Voc1MkUgn+lw+/v6A1UD8Y+5dNClJd6jOfK5LGPBI JmGCfe47BWWwd4Fj6nCbpRg4+X4X7fczcQ43+YqxsNf8BhCdKHGDNwTDYV7pxhCCxvKZ fMGoPAdv/51Ox3Cpu1x4SwZUlTFgMNSzHIEzkcNAkgbRfDCd5H6mhc6lt+gGfVfLG1mk 0+ZwMyF1eRqAmlh2Ff7K5XblUwo96FgpGK97TejD6V7G2yEB4zbR5FEn8HOx9VClOQoi uB4CwR/aHN29152VLqE05kBkjavCxGy1maeN8eq7QO0TCb29s4RKHm3OAmJ6B+cI2vPU hHdA== 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=Nlrvf8fp2U9OGb1ZIrjNCK2BX6Ii8V5yANnwk2DM7Vc=; b=kUjhWO4LoLQdp7bRYlsZzjBmRD1PAtzuF4PCNr4x0H1NqzcA3qriw0iTilppZnRw5B qjDpaB8niAB9FFFxpsxCj4czxb4DlNVkWMZdoMPknGCM5RZMsmmM1LaSPABv7/AaCemb 5fzwSqOWTc1MYV0k+ZcqvHO5MxdtQWI/iwvrcbcLkE8YL+vImM9bDdMoV+g3q1hVRQpU bamq81lztaAWEBkRjIv/Epi7W8CWdoVJpmGtwtzH6H1cLroKRZw4fueI7ckcZh9ngx6a Z6Ay2tHSit1zP7XYefidS37BhFX4Y1j7xO+KsvEStkvTq86kGd/TBTK7wWKN219AbM4o gwtg== X-Gm-Message-State: AGi0PuYZq3r0LYzYOPZMXrF/K0U9XnWmO/12qa4zck2bAL2SuOD653Jo 0fsSxP//6AkY1sgdwuF1Uig= X-Google-Smtp-Source: APiQypLvQYDbj5HxzhMm6TOMMehQ7TnmyH3QiJlEGiLPukJu8hIOsGMKZGc20Nhg+3Z6F+ltoqYH3w== X-Received: by 2002:a17:902:8b87:: with SMTP id ay7mr8510632plb.281.1586370244522; Wed, 08 Apr 2020 11:24:04 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id q201sm2568873pfq.32.2020.04.08.11.24.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:04 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 10/24] i2c: meson: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:22:57 +0800 Message-Id: <20200408182311.26869-11-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed drivers/i2c/busses/i2c-meson.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c index 06b3bed78421..b3bd869281d3 100644 --- a/drivers/i2c/busses/i2c-meson.c +++ b/drivers/i2c/busses/i2c-meson.c @@ -397,7 +397,6 @@ static int meson_i2c_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct meson_i2c *i2c; - struct resource *mem; struct i2c_timings timings; int irq, ret = 0; @@ -422,8 +421,7 @@ static int meson_i2c_probe(struct platform_device *pdev) return PTR_ERR(i2c->clk); } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->regs = devm_ioremap_resource(&pdev->dev, mem); + i2c->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->regs)) return PTR_ERR(i2c->regs); From patchwork Wed Apr 8 18:22:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207716 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 2FB19C2BA1A for ; Wed, 8 Apr 2020 18:24:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0323020768 for ; Wed, 8 Apr 2020 18:24:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WiWsxXk3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729632AbgDHSYQ (ORCPT ); Wed, 8 Apr 2020 14:24:16 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35715 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729706AbgDHSYN (ORCPT ); Wed, 8 Apr 2020 14:24:13 -0400 Received: by mail-pg1-f195.google.com with SMTP id k5so3704794pga.2; Wed, 08 Apr 2020 11:24:12 -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=CG7WSXBqexh3DissoKcJ4k0HfJzButfmb/h6318ckoQ=; b=WiWsxXk3bcXVfoDWZ6ApJq8zXCNW9LqR6aXC7TTWKjYHHgXuI7a13oEPw/UTtjbXIr IVxbRf5zbjBaXiS4VsM0XEfaSUixMZIBfa/dD4K0LrCKcdkTkORLBZyRPNJxraEWC81/ Ol+CQI05d9PD0aU9d/gLt9m5imEKnV7a2KYfmL/KbOZAEFmMhs+xcbd988hQvPWw4Rl6 RMKSs94WSAfa2G0GYcSSuQTQIX2/Yy1MIdIeERAt5CIFU2oqxAEyR7vDvH7lypv3PXm2 i5MXQt/XYD7rFx6sA0Nul3lQ+P+YSsF3yMueUuTk0woZfwllgEOvIDMQK4MAbKZBD/BK C+AQ== 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=CG7WSXBqexh3DissoKcJ4k0HfJzButfmb/h6318ckoQ=; b=VpPlLwa36ERGDlu5kR8jYmKCsjHIMJvHMn7vqjTnb1asiccDP5/pjkRRLqh2ud5tZY wOHOtywGKPh3UJJWHxbyBVz0bNPpiJqE+wat2Gew2JgzfMYHbUZRnJ9GsTKqYJLorKuX OtwYjzG3BHGWAoNGRh7hWi0q/asni8eXManzui883f8qCVqq/oxgoZOMgFNKmPWGtNmw dxWmkNdTcNOMSAfctx3NyT2hDefg+KL6PTUxRNkJcuDqVSjbD4/J6YKvOvfXqyBSYYCl a12L4j1x1eyogOktRDJ3PD8sBeLq2LkYJKTgS8MVvzgeqD4SqrRqz9j+4738vgzmiCw+ bwIw== X-Gm-Message-State: AGi0PuaFYBdW+q9os7MmtglW97nrFSP722cRGnjToEnCoSBdbltMJRDR M1gKQU40Ut18+QWAoQ2k2hM= X-Google-Smtp-Source: APiQypL8JqVjJsx6qsfjINDEQsLxU2HhtDqY8e7pNVXKyjCUWbmjTYpdcjqwYnXMwFQsMPtdh3SC+w== X-Received: by 2002:a63:ee0b:: with SMTP id e11mr8428682pgi.80.1586370252346; Wed, 08 Apr 2020 11:24:12 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id my15sm210276pjb.28.2020.04.08.11.24.11 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:11 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 12/24] i2c: emev2: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:22:59 +0800 Message-Id: <20200408182311.26869-13-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed 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 Wed Apr 8 18:23:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207715 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 7490AC2D0F4 for ; Wed, 8 Apr 2020 18:24:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4987C20784 for ; Wed, 8 Apr 2020 18:24:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aXKMOtA6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730820AbgDHSYW (ORCPT ); Wed, 8 Apr 2020 14:24:22 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33227 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729706AbgDHSYV (ORCPT ); Wed, 8 Apr 2020 14:24:21 -0400 Received: by mail-pf1-f195.google.com with SMTP id c138so3450142pfc.0; Wed, 08 Apr 2020 11:24:20 -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=gWiu3WBzXJViKuGLFAYe67OxpW6TfhQVL5xLKhPbse4=; b=aXKMOtA61ivgzF+cSBAXvbLTDGfkV56uHY5Fkdjhswf3W6AMKUVPJN8qfhvi7NrW6Y qv6UOw6JsGU06zaX7lWppIRd5LuBXiDqxL384tx6X7kgUa/pPsVk9fjXAadJiE1Ioys1 NPjDnzgIsfYx91jJojrUxP3mYujpsHJiTlt2cg28oJXbHce+k5m7mgHhU8oJb+BsznkI 0BSyF4Re3qtni+vyZrBIMB6G6GeHAuZ10Jg2LAkHCRr+5rLDMoZfVtVrrweQVw8P1kTP bEo0LQooQ2PyiJLSk0zWMEUdWQW5GZaebAWkjpTsfHgV9q7PpwsYVyqLsDodXYWcYQ2V Cneg== 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=gWiu3WBzXJViKuGLFAYe67OxpW6TfhQVL5xLKhPbse4=; b=BCLKda396dUOY4AHjiCOavxpjWROUZwn85MQZuwew0vTFH80l5TY3hQ7q2f4hW6IPr JDYE1jnijDeVT68bmqR/eZ5dgO7B6lD9CpJbTu7QlXNlmpHHmOjL9G1OUPthyLhdXw8M Ylgzf3YV6VNZXUhcEOgENU7p6qPuR/YBrtL5of+t7LJHnRw8VEv18VX7zpvNKDpPVM5W 5eAmgvkL6U2T746x85AskrlVaRY0T7NGlD86kntjBxI2D7rJOOlMGbrNhGGuhV8U01B/ cRE8SCcjMzdo6NLiBDdoBQMF8wmdYMBln5ouL2Gf/urCVRerkTP4zBJleBtm0u2dmmTf 49Gg== X-Gm-Message-State: AGi0PuZSjCus2cXTTzJvJVnkThsS5lLuEqP9u0v5Vnnei/g28373NsE8 nAF6XA9eCUcy0x6cPDgKlGQ= X-Google-Smtp-Source: APiQypJ3Bl7qUOhWUgKN1XcjWEoOtQmHSZJJr6hCpx+MtyErNuVCHuJ6axI73HFu7J1rdMGK/fJkUQ== X-Received: by 2002:a62:1d1:: with SMTP id 200mr9412749pfb.8.1586370260239; Wed, 08 Apr 2020 11:24:20 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id l59sm609696pjb.2.2020.04.08.11.24.19 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:19 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 14/24] i2c: altera: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:23:01 +0800 Message-Id: <20200408182311.26869-15-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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. Acked-by: Thor Thayer Signed-off-by: Dejin Zheng --- v1 -> v2: - no changed and thanks for Thor's review. drivers/i2c/busses/i2c-altera.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c index 1de23b4f3809..7c4c836a3228 100644 --- a/drivers/i2c/busses/i2c-altera.c +++ b/drivers/i2c/busses/i2c-altera.c @@ -382,7 +382,6 @@ static const struct i2c_algorithm altr_i2c_algo = { static int altr_i2c_probe(struct platform_device *pdev) { struct altr_i2c_dev *idev = NULL; - struct resource *res; int irq, ret; u32 val; @@ -390,8 +389,7 @@ static int altr_i2c_probe(struct platform_device *pdev) if (!idev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - idev->base = devm_ioremap_resource(&pdev->dev, res); + idev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(idev->base)) return PTR_ERR(idev->base); From patchwork Wed Apr 8 18:23:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207714 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 3F738C2BA1B for ; Wed, 8 Apr 2020 18:24:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 185DB20784 for ; Wed, 8 Apr 2020 18:24:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BNAUd3Ko" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729706AbgDHSY3 (ORCPT ); Wed, 8 Apr 2020 14:24:29 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41898 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729346AbgDHSY3 (ORCPT ); Wed, 8 Apr 2020 14:24:29 -0400 Received: by mail-pf1-f196.google.com with SMTP id b8so937380pfp.8; Wed, 08 Apr 2020 11:24:28 -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=WRDrnseeS89eCKjK2cIzxCoBnvg+cqcSp0yx2z2gfAU=; b=BNAUd3Kowbg8F6x3H1mpu7pq6oMHI0uMUzcrrJBARnU79Qk15WlIG5s8jeIQ8d7Bct 7+J/jcT/68eZLhxLaODR+f2zGmMiCiotV3rRa5DOs1ykt/H+2nGCrqp5jUfe3pX9zdbW NT7tFkNO+tVh5dJROdvC4XuPVLzhNMqYE0YRAA42SwWwS+pC3JAObs9WYmwAWPbAAIQ4 cQnPplVkp59rl5mColPJNYFrxX1cqtLfryM8agebpJfspLf31nq7Hb6qj5VP2HAatDGw epfmO5znxx0d1JQotzAyQDDP6uIbp1KUTO/c65KOnfAX4juaoW/AUJneHJBI1HYvwnu8 g4KQ== 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=WRDrnseeS89eCKjK2cIzxCoBnvg+cqcSp0yx2z2gfAU=; b=TxO+PV1DDVpKEsQvyMzqMK24b1dXhG2IvE3S6ZNnkrvNfBhCrNoCCV4uBigfMHz1OJ 2Xy4XHLYxXkyLFQaYnBgq8RYPosL6C0pe6b2wZ8CZ1VZG5tc8QS7bfL6s+bwi1ImePlJ s+LSmPRus7zyL4l9PCgPJ5VRDPchLuGuVIS0rYmCcvO7ErP3qmRs4eanKCjSV98cpyyh 13fS1KfSYL2szwdqdUIHAi3FN9J/peryno80VQarUMw+lGIpayCgCkLKJNohdpd2NZby CKwjmKMB3Hm1jiN1/0NkUD3i/Ktl4cd9aJXf5QL+o7zlNjrWNKxtUCAm5FrvVaZeNPP9 fUfA== X-Gm-Message-State: AGi0PuZUvtWpMFtxAJpekR69X5OJ1s5CsF7RZeLdKeY2lLAcIrra5Yef JRgYk1fH6nB2U2jcvEUxE+M= X-Google-Smtp-Source: APiQypJkKdTmivRcAdiIc/hrYIPv+j8xiiFF2R6C/zaJScBvFNqVjPoFOA02b2UpM1/SojfEuEnHXw== X-Received: by 2002:a63:770d:: with SMTP id s13mr8242862pgc.5.1586370267892; Wed, 08 Apr 2020 11:24:27 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id a3sm17202312pfg.172.2020.04.08.11.24.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:27 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 16/24] i2c: davinci: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:23:03 +0800 Message-Id: <20200408182311.26869-17-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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. Acked-by: Bartosz Golaszewski Signed-off-by: Dejin Zheng --- v1 -> v2: - no changed and thanks for Bartosz's review. drivers/i2c/busses/i2c-davinci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index e3ceb256a380..232a7679b69b 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -761,7 +761,6 @@ static int davinci_i2c_probe(struct platform_device *pdev) { struct davinci_i2c_dev *dev; struct i2c_adapter *adap; - struct resource *mem; struct i2c_bus_recovery_info *rinfo; int r, irq; @@ -814,8 +813,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) if (IS_ERR(dev->clk)) return PTR_ERR(dev->clk); - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dev->base = devm_ioremap_resource(&pdev->dev, mem); + dev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->base)) { return PTR_ERR(dev->base); } From patchwork Wed Apr 8 18:23:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207713 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 88FDDC2BB1D for ; Wed, 8 Apr 2020 18:24:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62CB120784 for ; Wed, 8 Apr 2020 18:24:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="neSONIh4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730851AbgDHSYh (ORCPT ); Wed, 8 Apr 2020 14:24:37 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:38451 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730840AbgDHSYh (ORCPT ); Wed, 8 Apr 2020 14:24:37 -0400 Received: by mail-pj1-f65.google.com with SMTP id t40so168116pjb.3; Wed, 08 Apr 2020 11:24:36 -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=0ErEIUYPQuwJL+gz/B/ioHgfa02LxYycDfKs2Fi66Ys=; b=neSONIh4ZVmHWtUSLb0sqJ86ZbX5tCj8kStV7NLwE2BUQoF/r+XR4FSK6/Hv0GsPRH vK393tYIE/5qu8RbIl46NKBluMapHWdWr05g+g6b1LW+TLZ1W1HYrTnLu9OdQllPklJn rUFKOkdBrxc5if8kYG8cVt7CTERz+9OjPFDb0z5fmKt5tpPnPgod+EXX8kUXi/jGP7gW 5ewR/BKvPnXe/bE1u4xfdlqVAwMS5Nh8fTOqbsUahpyJdBwM3E2Jb0zlYS0gMKitD2SX 3/FT/EE2efjgHL89jeHUvY4SAScfeOp304q9qZXV0KhV0LE9TLzliSPBHcxj0TjXnQ7M 0rmw== 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=0ErEIUYPQuwJL+gz/B/ioHgfa02LxYycDfKs2Fi66Ys=; b=We7l7GMyhKq7G22STHYPfUJqa1EMauXlla4vxw57p8dwhDyLjWzGLgTBYcLbu4q4Ms d340tC2uZq5XnhETbXSEKhVbMbPkH9e9qg4QfDS5/QDHqVLpDgbbw0/KwwMrX2PFf7sl OB8eKIXR4Omjx43cAPoH8Zw+MH30oHUOcYp0aQm30ePaTpvn4FDYoCTFhmctsxjcBAyv frpd2XH36jgRJTSu4LKkBSXLuzMvWk84UgM/hD6jEvgSIwuRcwvORJbqKD3FQbauokDM mo9azPuC5RHCu9yEzLsIQm9J+MG331tu/eEqEceVgDWHkkb9f11J/fziwFMOWpT5601V FVrg== X-Gm-Message-State: AGi0Puby0qwIANplizNSl7zSjoxqGgLUcXR5M03yx8FfSHlPFWc5Iw0u 39CQAcMu75h9HnCRkk+SwqizwTib X-Google-Smtp-Source: APiQypKfBfYivLEY5TF2J2SWQbyJvU2/jEhBXAJlMeLQ4XrMzfS4orlBY0+nPj9EU+6E3OQUG+LpvA== X-Received: by 2002:a17:90a:c983:: with SMTP id w3mr7135192pjt.102.1586370275600; Wed, 08 Apr 2020 11:24:35 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id mq6sm202421pjb.38.2020.04.08.11.24.34 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:35 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 18/24] i2c: lpc2k: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:23:05 +0800 Message-Id: <20200408182311.26869-19-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed drivers/i2c/busses/i2c-lpc2k.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c index deea18b14add..30f6dd1d37c7 100644 --- a/drivers/i2c/busses/i2c-lpc2k.c +++ b/drivers/i2c/busses/i2c-lpc2k.c @@ -346,7 +346,6 @@ static const struct i2c_algorithm i2c_lpc2k_algorithm = { static int i2c_lpc2k_probe(struct platform_device *pdev) { struct lpc2k_i2c *i2c; - struct resource *res; u32 bus_clk_rate; u32 scl_high; u32 clkrate; @@ -356,8 +355,7 @@ static int i2c_lpc2k_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 Wed Apr 8 18:23:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207712 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 E770CC2BA1B for ; Wed, 8 Apr 2020 18:24:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD2E920753 for ; Wed, 8 Apr 2020 18:24:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EjxsYuMF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729789AbgDHSYr (ORCPT ); Wed, 8 Apr 2020 14:24:47 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33260 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730868AbgDHSYp (ORCPT ); Wed, 8 Apr 2020 14:24:45 -0400 Received: by mail-pf1-f196.google.com with SMTP id c138so3450581pfc.0; Wed, 08 Apr 2020 11:24: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=6pXCyMz/hgXB1r77DKpvsj8gTFG4HyxUEA9kPHJFiu4=; b=EjxsYuMFaE02XNdx/ds+zMM6V4qa61qZ22mVxtDrQU6QKJzPEzGuT0UTUrmpcCYk/A TcTijBL6w6xjXbq85IKCtcBdIrOY5hQNWz/h3yBVxbCldHqxkpmH7oDfOLyUdzPY2XjI 7HsBd7ZoVV0GD/gcUjGSozg+4cKhMR3uvXkjBYFUtk1qtb277WgxNpDayb1PL8fRnjqI Zy1/gNozImfdOP2IPpNFCL4s3dl0NJX6J/UKrr0ks+LSQKKNMbkSckXcQoJEqdMfeoYx sMn1Z+u1Q4u5fWk6jKiuMH3viEvmWzdHSfzYMXP9R9CnkfLie7mbPulnqtGEYDli5Lc6 sUpg== 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=6pXCyMz/hgXB1r77DKpvsj8gTFG4HyxUEA9kPHJFiu4=; b=hfa+a2Vc/iwlVr2CLu2aicBvi+ZFXdK0X7i3RB3Nn9kovT7W6ISlYV0YXpnlSnsmhW 1WhH6QyDgO6NMd3XhJvJm75kXwjJRtV9+4HRxZGWhntx7Ak6tjyQWCOprxQ/c78tqbOp z99XRhFWizjnokPAQOJN48Ssx1hH73uBlcwVtTYsC86HoSiNiKSTF7lvoay3C8/0Y4FU QeJtQVN4vDbr3P1+nqdcVu3WpDD2AaSIUMy/Jn1e/Mlpmm1CaLnoqUR19x9dDsTn9dTf Vu9gvSlN2lNWSl25HBA+z3wgS87XcJlVETu3FBJDNeCgKeXK41uXGEM7wE8CAXF1JinU AC2g== X-Gm-Message-State: AGi0PuYhKOzROK/F6JQypgVt5j7ZelJl4F+z2Aq0g93L/N8WkncnpSDU YbePKYEPoMIwPhUdxJjVaH8= X-Google-Smtp-Source: APiQypLo/hktnNaf3za7TY8byxlfJEhPVwUCHO8DYf0IiYeYlNvE37Bel3/FQzGIZPNZZ4qxI3uelw== X-Received: by 2002:a62:1b05:: with SMTP id b5mr9125749pfb.281.1586370283246; Wed, 08 Apr 2020 11:24:43 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id 132sm17428652pfc.183.2020.04.08.11.24.42 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:42 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 20/24] i2c: stu300: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:23:07 +0800 Message-Id: <20200408182311.26869-21-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed drivers/i2c/busses/i2c-stu300.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index 42e0a53e7fa4..9a03779c149e 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c @@ -860,7 +860,6 @@ static int stu300_probe(struct platform_device *pdev) { struct stu300_dev *dev; struct i2c_adapter *adap; - struct resource *res; int bus_nr; int ret = 0; @@ -876,8 +875,7 @@ static int stu300_probe(struct platform_device *pdev) } dev->pdev = pdev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dev->virtbase = devm_ioremap_resource(&pdev->dev, res); + dev->virtbase = devm_platform_ioremap_resource(pdev, 0); dev_dbg(&pdev->dev, "initialize bus device I2C%d on virtual " "base %p\n", bus_nr, dev->virtbase); if (IS_ERR(dev->virtbase)) From patchwork Wed Apr 8 18:23:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207711 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 E8DBEC2BA1A for ; Wed, 8 Apr 2020 18:24:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1A3520784 for ; Wed, 8 Apr 2020 18:24:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ifNypJ1b" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730886AbgDHSYx (ORCPT ); Wed, 8 Apr 2020 14:24:53 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:39702 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729909AbgDHSYw (ORCPT ); Wed, 8 Apr 2020 14:24:52 -0400 Received: by mail-pj1-f66.google.com with SMTP id z3so167450pjr.4; Wed, 08 Apr 2020 11:24:51 -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=+CbyZx4DsVajeH73SDij1aDz7h0XZqQanSKjpi7JEZo=; b=ifNypJ1b7dDTGPlgd0wuyCd0/MgV86FGP32CUV5mgq6rxfV6uiQ84wMLgUaT+ANg+N ti6jfHGH5bu8QTyCuq0wdXWjKKnfT8jm1C9+plceO+vFIl1jXSIrq7lgsGz94zkIi/Ai H2lhGMtiyftnqJ/IFx525rbmAS2hlzFYf3COIgrgSXZetTLINLIYc3sCbQjbZ6EysbLS P6liOdgB3aRdxMETouMuWz++bn4eskKE6hsHSmnprTwyMlpJxMLCHGh+PNuVXvKLXr/s NrRV3qT5Oevm6XQdaMcx2U9iVCZrSqwK4Cf0EaMEGQrnwfSHXEoUAflOWdqXXQP/Y319 z9nQ== 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=+CbyZx4DsVajeH73SDij1aDz7h0XZqQanSKjpi7JEZo=; b=I0CXhHJgvNIvlC4YM/jqnVJ2y9KtWvp3M78qj4b1lFEJ5yClB7L4Z/Vw6ooKbUm4S4 o3V4i+mkMdYrWYO7UWioKKFpRPd1a91LfyeNBLUrM3D5SprLAsvzjxFIYD51sC/12wZe 76y4D4Tx9l0ssYhrgQ/c9+uniLzp0p2iIElmgFtR2weXSFAMCr3PnA+4YuyVNQ76h/SJ POxT3mq80CSOelGJzDXxjGwiA5eWPu8lyNwXOODJ+spCFYSXdoDUItHYG5NA+AaVQMia B2V2YAAXolEZpjAiSl3xjdHYGaUC7hd3808+3qE8oDZ8qDt/VpJlFohtD94Kp9py7fD4 ZpNQ== X-Gm-Message-State: AGi0PubjwgedA/LUtF8oFa8UCYxQfKxWq5SEMsMLMkNqtyXlEY+r84nV FWRkRSd3tPxzS3S20T+njeg= X-Google-Smtp-Source: APiQypKLBpaEMClcnZVxlRUa0fDVguWyKkQPpS9+e2yWv+QXOmmSUtt4LAQcRRurfaI1rycO8lzzGQ== X-Received: by 2002:a17:90a:4809:: with SMTP id a9mr6888244pjh.73.1586370291040; Wed, 08 Apr 2020 11:24:51 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id u129sm17111100pfb.101.2020.04.08.11.24.50 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:50 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 22/24] i2c: xlr: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:23:09 +0800 Message-Id: <20200408182311.26869-23-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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 --- v1 -> v2: - no changed drivers/i2c/busses/i2c-xlr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-xlr.c b/drivers/i2c/busses/i2c-xlr.c index 34cd4b308540..544fd9459d60 100644 --- a/drivers/i2c/busses/i2c-xlr.c +++ b/drivers/i2c/busses/i2c-xlr.c @@ -362,7 +362,6 @@ static int xlr_i2c_probe(struct platform_device *pdev) { const struct of_device_id *match; struct xlr_i2c_private *priv; - struct resource *res; struct clk *clk; unsigned long clk_rate; unsigned long clk_div; @@ -380,8 +379,7 @@ static int xlr_i2c_probe(struct platform_device *pdev) else priv->cfg = &xlr_i2c_config_default; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->iobase = devm_ioremap_resource(&pdev->dev, res); + priv->iobase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->iobase)) return PTR_ERR(priv->iobase); From patchwork Wed Apr 8 18:23:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 207710 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 23CD6C2BA1B for ; Wed, 8 Apr 2020 18:25:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EEDAA20771 for ; Wed, 8 Apr 2020 18:25:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i14l3L3m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729909AbgDHSZC (ORCPT ); Wed, 8 Apr 2020 14:25:02 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:43141 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729773AbgDHSZC (ORCPT ); Wed, 8 Apr 2020 14:25:02 -0400 Received: by mail-pl1-f195.google.com with SMTP id z6so1322628plk.10; Wed, 08 Apr 2020 11:24:59 -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=lEwiscqdjE+0yBwv6UHLDrqeoId+6rAZT43UcJfE/I0=; b=i14l3L3m+gTu7hgExNhjKaqbfcwLEYvm5aI08/qNSsFlm1XTSP+QhXvh0KH3bpmNAq 6d1IeHYjbpblCqvPREjPPyouuki2Jes7zAjsVfu+0Dn7ggPF3obcw7bs7p4Zt1Aykuih q8mvrYOVZHkjzDoY0qV6SDr0zkdN5hSO2v4YA6yhLDsYAHIDhPE2tm9Gn0ewsXsjGy4V ZY8qEwRl+Ds7nR65+/xNXSQ4OkZo0JM/Wh9LDe9q1V6Xc/CmyK/4g+XIuKbcy1PZV3In 7xANJdj3USwHeXNyTQI5JdupqBFupUUzCZRqpXIVzH13LGsIQ0pOHTrzRcHx317yrPT5 rTVA== 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=lEwiscqdjE+0yBwv6UHLDrqeoId+6rAZT43UcJfE/I0=; b=ZtlOqrzYzZLWkJzcZQojXNr33upxEYWIGi9IV6L8xjcht2X0t0dKl42i12n0Nxgypq bDMQJPyeLaqr5VCoMH8wLu0NE938+Ixd+a48phqmcImVrrP6Hr1a7oVCJSp7zj6hUjMo nAfMpocFqGAAwlqfHTWmFFMlSUtIwQVlTyolXgOp3JphM8smPVsagw2Vz8k8YjV+h+W8 fskgiw1sGdsz9zTL287hxBfiFAh1SzTb+YQNGBSPcEoT4rI4q5q9xHLM/9t/BU91IWzr Lwl2wJOIhvkQNWk7EfWc4QWi8sl2GxxZ0w28z/H8gVIPCEbkPzngcPRMq7ASkOcpJjtS skBA== X-Gm-Message-State: AGi0PubkskDHrybrO/laYIWOvo72A0PfR0fV6Cvznf1cRv0arxcru9L8 mlSBp9tNYx1l4dNhJddThFw= X-Google-Smtp-Source: APiQypJCtRDPT+H+rYaPeQ9fT9TsEeZuEGB8ryEaN7siOyR6GWwcjUSFzqe0S52EfWTSqf5n48VWjw== X-Received: by 2002:a17:90a:a113:: with SMTP id s19mr7107978pjp.161.1586370299455; Wed, 08 Apr 2020 11:24:59 -0700 (PDT) Received: from localhost (89.208.244.140.16clouds.com. [89.208.244.140]) by smtp.gmail.com with ESMTPSA id a13sm231327pjq.0.2020.04.08.11.24.58 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Apr 2020 11:24:59 -0700 (PDT) From: Dejin Zheng To: thor.thayer@linux.intel.com, krzysztof.adamski@nokia.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsekhar@ti.com, bgolaszewski@baylibre.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, 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, gcherian@marvell.com, jun.nie@linaro.org, shawnguo@kernel.org, tglx@linutronix.de, zhouyanjie@wanyeetech.com, martin.blumenstingl@googlemail.com Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v2 24/24] i2c: octeon-platdrv: convert to devm_platform_ioremap_resource Date: Thu, 9 Apr 2020 02:23:11 +0800 Message-Id: <20200408182311.26869-25-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com> References: <20200408182311.26869-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. Acked-by: Robert Richter Signed-off-by: Dejin Zheng --- v1 -> v2: - no changed and thanks for Robert's review. drivers/i2c/busses/i2c-octeon-platdrv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-octeon-platdrv.c b/drivers/i2c/busses/i2c-octeon-platdrv.c index 64bda83e65ac..0c227963c8d6 100644 --- a/drivers/i2c/busses/i2c-octeon-platdrv.c +++ b/drivers/i2c/busses/i2c-octeon-platdrv.c @@ -136,7 +136,6 @@ static int octeon_i2c_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; int irq, result = 0, hlc_irq = 0; - struct resource *res_mem; struct octeon_i2c *i2c; bool cn78xx_style; @@ -167,8 +166,7 @@ static int octeon_i2c_probe(struct platform_device *pdev) i2c->roff.twsi_int = 0x10; i2c->roff.sw_twsi_ext = 0x18; - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->twsi_base = devm_ioremap_resource(&pdev->dev, res_mem); + i2c->twsi_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c->twsi_base)) { result = PTR_ERR(i2c->twsi_base); goto out;