linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: samsung: Use devm_platform_ioremap_resource() to simplify code
@ 2020-04-19  7:06 Tang Bin
  2020-04-21  9:37 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Tang Bin @ 2020-04-19  7:06 UTC (permalink / raw)
  To: kgene, krzk, linux
  Cc: linux-arm-kernel, linux-samsung-soc, linux-kernel, Tang Bin,
	Shengju Zhang

Use devm_platform_ioremap_resource() instead of
platform_get_resource()+ devm_ioremap_resource().

Signed-off-by: Shengju Zhang <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 arch/arm/plat-samsung/adc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index 839bf7d5f..55b1925f6 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -333,7 +333,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct adc_device *adc;
-	struct resource *regs;
 	enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
 	int ret;
 	unsigned tmp;
@@ -370,8 +369,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
 		return PTR_ERR(adc->clk);
 	}
 
-	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	adc->regs = devm_ioremap_resource(dev, regs);
+	adc->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(adc->regs))
 		return PTR_ERR(adc->regs);
 
-- 
2.20.1.windows.1




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

* Re: [PATCH] ARM: samsung: Use devm_platform_ioremap_resource() to simplify code
  2020-04-19  7:06 [PATCH] ARM: samsung: Use devm_platform_ioremap_resource() to simplify code Tang Bin
@ 2020-04-21  9:37 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-04-21  9:37 UTC (permalink / raw)
  To: Tang Bin
  Cc: kgene, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	Shengju Zhang

On Sun, Apr 19, 2020 at 03:06:07PM +0800, Tang Bin wrote:
> Use devm_platform_ioremap_resource() instead of
> platform_get_resource()+ devm_ioremap_resource().
> 
> Signed-off-by: Shengju Zhang <zhangshengju@cmss.chinamobile.com>
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>  arch/arm/plat-samsung/adc.c | 4 +---

Thanks, applied.

Best regards,
Krzysztof


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

end of thread, other threads:[~2020-04-21  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-19  7:06 [PATCH] ARM: samsung: Use devm_platform_ioremap_resource() to simplify code Tang Bin
2020-04-21  9:37 ` Krzysztof Kozlowski

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).