All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dejin Zheng <zhengdejin5@gmail.com>
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 <zhengdejin5@gmail.com>
Subject: [PATCH v2 06/24] i2c: xlp9xx: convert to devm_platform_ioremap_resource
Date: Thu,  9 Apr 2020 02:22:53 +0800	[thread overview]
Message-ID: <20200408182311.26869-7-zhengdejin5@gmail.com> (raw)
In-Reply-To: <20200408182311.26869-1-zhengdejin5@gmail.com>

use devm_platform_ioremap_resource() to simplify code, which
contains platform_get_resource and devm_ioremap_resource.

Acked-by: Robert Richter <rrichter@marvell.com>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
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);
 
-- 
2.25.0


  parent reply	other threads:[~2020-04-08 18:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 18:22 [PATCH v2 00/24] convert to devm_platform_ioremap_resource Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 01/24] i2c: img-scb: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 02/24] i2c: mv64xxx: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 03/24] i2c: owl: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 04/24] i2c: exynos5: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 05/24] i2c: zx2967: " Dejin Zheng
2020-04-08 18:22 ` Dejin Zheng [this message]
2020-04-08 18:22 ` [PATCH v2 07/24] i2c: synquacer: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 08/24] i2c: rk3x: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 09/24] i2c: qup: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 10/24] i2c: meson: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 11/24] i2c: hix5hd2: " Dejin Zheng
2020-04-08 18:22 ` [PATCH v2 12/24] i2c: emev2: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 13/24] i2c: jz4780: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 14/24] i2c: altera: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 15/24] i2c: axxia: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 16/24] i2c: davinci: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 17/24] i2c: digicolor: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 18/24] i2c: lpc2k: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 19/24] i2c: sirf: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 20/24] i2c: stu300: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 21/24] i2c: sun6i-p2wi: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 22/24] i2c: xlr: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 23/24] i2c: bcm-kona: " Dejin Zheng
2020-04-08 18:23 ` [PATCH v2 24/24] i2c: octeon-platdrv: " Dejin Zheng
2020-04-08 19:52 ` [PATCH v2 00/24] " Wolfram Sang
2020-04-09 13:15   ` Dejin Zheng
2020-04-09 13:42     ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200408182311.26869-7-zhengdejin5@gmail.com \
    --to=zhengdejin5@gmail.com \
    --cc=afaerber@suse.de \
    --cc=agross@kernel.org \
    --cc=ardb@kernel.org \
    --cc=baohua@kernel.org \
    --cc=baruch@tkos.co.il \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=gcherian@marvell.com \
    --cc=gregory.clement@bootlin.com \
    --cc=heiko@sntech.de \
    --cc=jun.nie@linaro.org \
    --cc=kgene@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krzk@kernel.org \
    --cc=krzysztof.adamski@nokia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mripard@kernel.org \
    --cc=nsekhar@ti.com \
    --cc=paul@crapouillou.net \
    --cc=rjui@broadcom.com \
    --cc=rrichter@marvell.com \
    --cc=sbranden@broadcom.com \
    --cc=shawnguo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thor.thayer@linux.intel.com \
    --cc=vz@mleia.com \
    --cc=wens@csie.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.