From: Tang Bin <tangbin@cmss.chinamobile.com>
To: kgene@kernel.org, krzk@kernel.org, linux@armlinux.org.uk
Cc: Shengju Zhang <zhangshengju@cmss.chinamobile.com>,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Tang Bin <tangbin@cmss.chinamobile.com>
Subject: [PATCH] ARM: samsung: Use devm_platform_ioremap_resource() to simplify code
Date: Sun, 19 Apr 2020 15:06:07 +0800 [thread overview]
Message-ID: <20200419070607.15488-1-tangbin@cmss.chinamobile.com> (raw)
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-04-19 7:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 7:06 Tang Bin [this message]
2020-04-21 9:37 ` [PATCH] ARM: samsung: Use devm_platform_ioremap_resource() to simplify code Krzysztof Kozlowski
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=20200419070607.15488-1-tangbin@cmss.chinamobile.com \
--to=tangbin@cmss.chinamobile.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=zhangshengju@cmss.chinamobile.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox