linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] soc: sunxi: convert to devm_platform_ioremap_resource
@ 2019-12-14 17:54 Yangtao Li
  2019-12-14 17:54 ` [PATCH 02/10] soc: samsung: " Yangtao Li
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Yangtao Li @ 2019-12-14 17:54 UTC (permalink / raw)
  To: khilman, leoyang.li, khalasa, john, matthias.bgg, agross,
	bjorn.andersson, kgene, krzk, mripard, wens, ssantosh, jun.nie,
	shawnguo
  Cc: linux-arm-kernel, linux-amlogic, linux-kernel, linuxppc-dev,
	linux-mips, linux-mediatek, linux-arm-msm, linux-samsung-soc,
	Yangtao Li

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 1b0d50f36349..f73fbcc73f51 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -320,7 +320,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {
 
 static int sunxi_sram_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct dentry *d;
 	struct regmap *emac_clock;
 	const struct sunxi_sramc_variant *variant;
@@ -331,8 +330,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
 	if (!variant)
 		return -EINVAL;
 
-	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);
 
-- 
2.17.1


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

end of thread, other threads:[~2020-01-13 19:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-14 17:54 [PATCH 01/10] soc: sunxi: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-14 17:54 ` [PATCH 02/10] soc: samsung: " Yangtao Li
2019-12-15 11:57   ` Krzysztof Kozlowski
2019-12-14 17:54 ` [PATCH 03/10] soc: amlogic: " Yangtao Li
2019-12-14 17:54 ` [PATCH 04/10] soc: zte: " Yangtao Li
2019-12-14 17:54 ` [PATCH 05/10] soc: fsl: " Yangtao Li
2019-12-14 17:54 ` [PATCH 06/10] soc: mediatek: " Yangtao Li
2019-12-14 17:54 ` [PATCH 07/10] soc: ti: wkup_m3_ipc: " Yangtao Li
2019-12-14 17:54 ` [PATCH 08/10] soc: lantiq: " Yangtao Li
2020-01-13 19:10   ` Paul Burton
2019-12-14 17:54 ` [PATCH 09/10] soc: ixp4xx: qmgr: " Yangtao Li
2019-12-14 17:54 ` [PATCH 10/10] soc: qcom: " Yangtao Li
2019-12-15 10:48   ` Marc Zyngier
2019-12-15 12:00     ` Frank Lee
2019-12-18  2:45 ` [PATCH 01/10] soc: sunxi: " Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).