diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-29 08:06:03 +0000 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 14:18:44 +0100 |
commit | 5bec839f13a96eeb787142c36b6da2380a616999 (patch) | |
tree | 8792a4d1f4180192fc6486319810c1aeccabe686 /drivers/pwm/pwm-brcmstb.c | |
parent | 4906bf5482e4965a686ea61f78e87623a792bd8f (diff) | |
download | linux-5bec839f13a96eeb787142c36b6da2380a616999.tar.gz linux-5bec839f13a96eeb787142c36b6da2380a616999.tar.bz2 linux-5bec839f13a96eeb787142c36b6da2380a616999.zip |
pwm: brcmstb: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-brcmstb.c')
-rw-r--r-- | drivers/pwm/pwm-brcmstb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c index fea612c45f20..8b66f9d2f589 100644 --- a/drivers/pwm/pwm-brcmstb.c +++ b/drivers/pwm/pwm-brcmstb.c @@ -234,7 +234,6 @@ MODULE_DEVICE_TABLE(of, brcmstb_pwm_of_match); static int brcmstb_pwm_probe(struct platform_device *pdev) { struct brcmstb_pwm *p; - struct resource *res; int ret; p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL); @@ -262,8 +261,7 @@ static int brcmstb_pwm_probe(struct platform_device *pdev) p->chip.base = -1; p->chip.npwm = 2; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - p->base = devm_ioremap_resource(&pdev->dev, res); + p->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(p->base)) { ret = PTR_ERR(p->base); goto out_clk; |