lkml.org 
[lkml]   [2019]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 19/32] pwm: puv3: convert to devm_platform_ioremap_resource
Date
Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/pwm/pwm-puv3.c b/drivers/pwm/pwm-puv3.c
index 9d0bd87a425e..2367dad7cf95 100644
--- a/drivers/pwm/pwm-puv3.c
+++ b/drivers/pwm/pwm-puv3.c
@@ -100,7 +100,6 @@ static const struct pwm_ops puv3_pwm_ops = {
static int pwm_probe(struct platform_device *pdev)
{
struct puv3_pwm_chip *puv3;
- struct resource *r;
int ret;

puv3 = devm_kzalloc(&pdev->dev, sizeof(*puv3), GFP_KERNEL);
@@ -111,8 +110,7 @@ static int pwm_probe(struct platform_device *pdev)
if (IS_ERR(puv3->clk))
return PTR_ERR(puv3->clk);

- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- puv3->base = devm_ioremap_resource(&pdev->dev, r);
+ puv3->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(puv3->base))
return PTR_ERR(puv3->base);

--
2.17.1
\
 
 \ /
  Last update: 2019-12-29 09:08    [W:0.262 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site