Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
From: Yangtao Li <tiny.windzz@gmail.com>
To: claudiu.beznea@microchip.com, thierry.reding@gmail.com,
	u.kleine-koenig@pengutronix.de, nicolas.ferre@microchip.com,
	alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com,
	rjui@broadcom.com, sbranden@broadcom.com,
	bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com,
	nsaenzjulienne@suse.de, shc_work@mail.ru, shawnguo@kernel.org,
	s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, linux-imx@nxp.com, vz@mleia.com,
	slemieux.tyco@gmail.com, khilman@baylibre.com,
	matthias.bgg@gmail.com, heiko@sntech.de, palmer@dabbelt.com,
	paul.walmsley@sifive.com, mripard@kernel.org, wens@csie.org,
	jonathanh@nvidia.com, linux@prisktech.co.nz,
	linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	linux-riscv@lists.infradead.org, linux-tegra@vger.kernel.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 10/32] pwm: zx: convert to devm_platform_ioremap_resource
Date: Sun, 29 Dec 2019 08:05:48 +0000
Message-ID: <20191229080610.7597-10-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191229080610.7597-1-tiny.windzz@gmail.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/pwm/pwm-zx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-zx.c b/drivers/pwm/pwm-zx.c
index e2c21cc34a96..0f5e8919b034 100644
--- a/drivers/pwm/pwm-zx.c
+++ b/drivers/pwm/pwm-zx.c
@@ -196,7 +196,6 @@ static const struct pwm_ops zx_pwm_ops = {
 static int zx_pwm_probe(struct platform_device *pdev)
 {
 	struct zx_pwm_chip *zpc;
-	struct resource *res;
 	unsigned int i;
 	int ret;
 
@@ -204,8 +203,7 @@ static int zx_pwm_probe(struct platform_device *pdev)
 	if (!zpc)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	zpc->base = devm_ioremap_resource(&pdev->dev, res);
+	zpc->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(zpc->base))
 		return PTR_ERR(zpc->base);
 
-- 
2.17.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply index

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-29  8:05 [PATCH 01/32] pwm: sun4i: " Yangtao Li
2019-12-29  8:05 ` [PATCH 02/32] pwm: fsl-ftm: " Yangtao Li
2019-12-29  8:05 ` [PATCH 03/32] pwm: rcar: " Yangtao Li
2019-12-29  8:05 ` [PATCH 04/32] pwm: renesas-tpu: " Yangtao Li
2019-12-29  8:05 ` [PATCH 05/32] pwm: ep93xx: " Yangtao Li
2019-12-29  8:05 ` [PATCH 06/32] pwm: tegra: " Yangtao Li
2019-12-29  8:05 ` [PATCH 07/32] pwm: mediatek: " Yangtao Li
2019-12-29  8:05 ` [PATCH 08/32] pwm: sti: " Yangtao Li
2019-12-29  8:05 ` [PATCH 09/32] pwm: pxa: " Yangtao Li
2019-12-29  8:05 ` Yangtao Li [this message]
2019-12-29  8:05 ` [PATCH 11/32] pwm: spear: " Yangtao Li
2019-12-29  8:05 ` [PATCH 12/32] pwm: bcm-kona: " Yangtao Li
2019-12-29  8:05 ` [PATCH 13/32] pwm: lpc32xx: " Yangtao Li
2019-12-29  8:05 ` [PATCH 14/32] pwm: meson: " Yangtao Li
2019-12-31 14:53   ` Martin Blumenstingl
2019-12-29  8:05 ` [PATCH 15/32] pwm: rockchip: " Yangtao Li
2019-12-30  8:39   ` Heiko Stuebner
2019-12-29  8:05 ` [PATCH 16/32] pwm: bcm-iproc: " Yangtao Li
2019-12-29  8:05 ` [PATCH 17/32] pwm: samsung: " Yangtao Li
2019-12-29  8:05 ` [PATCH 18/32] pwm: tiehrpwm: " Yangtao Li
2019-12-29  8:05 ` [PATCH 19/32] pwm: puv3: " Yangtao Li
2019-12-29  8:05 ` [PATCH 20/32] pwm: imx: " Yangtao Li
2019-12-29  8:05 ` [PATCH 21/32] pwm: tiecap: " Yangtao Li
2019-12-29  8:06 ` [PATCH 22/32] pwm: bcm2835: " Yangtao Li
2019-12-29  8:06 ` [PATCH 23/32] pwm: berlin: " Yangtao Li
2019-12-29  8:06 ` [PATCH 24/32] pwm: vt8500: " Yangtao Li
2019-12-29  8:06 ` [PATCH 25/32] pwm: brcmstb: " Yangtao Li
2020-01-07 10:54   ` Nicolas Saenz Julienne
2019-12-29  8:06 ` [PATCH 26/32] pwm: mtk-disp: " Yangtao Li
2020-02-20 20:49   ` Matthias Brugger
2019-12-29  8:06 ` [PATCH 27/32] pwm: clps711x: " Yangtao Li
2019-12-29  8:06 ` [PATCH 28/32] pwm: img: " Yangtao Li
2019-12-29  8:06 ` [PATCH 29/32] pwm: lpc18xx-sct: " Yangtao Li
2019-12-29  8:06 ` [PATCH 30/32] pwm: hibvt: do some cleanup Yangtao Li
2020-02-20 20:41   ` Uwe Kleine-König
2019-12-29  8:06 ` [PATCH 31/32] pwm: sifive: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-29  8:06 ` [PATCH 32/32] pwm: atmel: " Yangtao Li
2020-01-06 10:32   ` Claudiu.Beznea

Reply instructions:

You may reply publically 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=20191229080610.7597-10-tiny.windzz@gmail.com \
    --to=tiny.windzz@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=heiko@sntech.de \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@pengutronix.de \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=ludovic.desroches@microchip.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rjui@broadcom.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sbranden@broadcom.com \
    --cc=shawnguo@kernel.org \
    --cc=shc_work@mail.ru \
    --cc=slemieux.tyco@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vz@mleia.com \
    --cc=wens@csie.org \
    /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

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git