Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 01/32] pwm: sun4i: convert to devm_platform_ioremap_resource
@ 2019-12-29  8:05 Yangtao Li
  2019-12-29  8:05 ` [PATCH 02/32] pwm: fsl-ftm: " Yangtao Li
                   ` (30 more replies)
  0 siblings, 31 replies; 38+ messages in thread
From: Yangtao Li @ 2019-12-29  8:05 UTC (permalink / raw)
  To: claudiu.beznea, thierry.reding, u.kleine-koenig, nicolas.ferre,
	alexandre.belloni, ludovic.desroches, rjui, sbranden,
	bcm-kernel-feedback-list, f.fainelli, nsaenzjulienne, shc_work,
	shawnguo, s.hauer, kernel, festevam, linux-imx, vz,
	slemieux.tyco, khilman, matthias.bgg, heiko, palmer,
	paul.walmsley, mripard, wens, jonathanh, linux, linux-arm-kernel,
	linux-pwm, linux-kernel, linux-rpi-kernel, linux-amlogic,
	linux-mediatek, linux-rockchip, linux-riscv, linux-tegra
  Cc: Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
index 581d23287333..f2afd312f77c 100644
--- a/drivers/pwm/pwm-sun4i.c
+++ b/drivers/pwm/pwm-sun4i.c
@@ -344,7 +344,6 @@ MODULE_DEVICE_TABLE(of, sun4i_pwm_dt_ids);
 static int sun4i_pwm_probe(struct platform_device *pdev)
 {
 	struct sun4i_pwm_chip *pwm;
-	struct resource *res;
 	int ret;
 
 	pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL);
@@ -355,8 +354,7 @@ static int sun4i_pwm_probe(struct platform_device *pdev)
 	if (!pwm->data)
 		return -ENODEV;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pwm->base = devm_ioremap_resource(&pdev->dev, res);
+	pwm->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pwm->base))
 		return PTR_ERR(pwm->base);
 
-- 
2.17.1


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

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, back to index

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-29  8:05 [PATCH 01/32] pwm: sun4i: convert to devm_platform_ioremap_resource 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 ` [PATCH 10/32] pwm: zx: " Yangtao Li
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

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