* [PATCH] PM / devfreq: rockchip-dfi: convert to devm_platform_ioremap_resource
@ 2019-12-15 13:53 Yangtao Li
2019-12-15 15:31 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2019-12-15 13:53 UTC (permalink / raw)
To: cw00.choi, myungjoo.ham, kyungmin.park, heiko
Cc: linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/devfreq/event/rockchip-dfi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
index 5d1042188727..cc5d4c01af0b 100644
--- a/drivers/devfreq/event/rockchip-dfi.c
+++ b/drivers/devfreq/event/rockchip-dfi.c
@@ -177,7 +177,6 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct rockchip_dfi *data;
- struct resource *res;
struct devfreq_event_desc *desc;
struct device_node *np = pdev->dev.of_node, *node;
@@ -185,8 +184,7 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
if (!data)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->regs = devm_ioremap_resource(&pdev->dev, res);
+ data->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->regs))
return PTR_ERR(data->regs);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PM / devfreq: rockchip-dfi: convert to devm_platform_ioremap_resource
2019-12-15 13:53 [PATCH] PM / devfreq: rockchip-dfi: convert to devm_platform_ioremap_resource Yangtao Li
@ 2019-12-15 15:31 ` Chanwoo Choi
0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2019-12-15 15:31 UTC (permalink / raw)
To: Yangtao Li
Cc: Chanwoo Choi, MyungJoo Ham, Kyungmin Park, Heiko Stübner,
Linux PM list, linux-arm-kernel, open list:ARM/Rockchip SoC...,
linux-kernel
2019년 12월 15일 (일) 오후 10:53, Yangtao Li <tiny.windzz@gmail.com>님이 작성:
>
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/devfreq/event/rockchip-dfi.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
> index 5d1042188727..cc5d4c01af0b 100644
> --- a/drivers/devfreq/event/rockchip-dfi.c
> +++ b/drivers/devfreq/event/rockchip-dfi.c
> @@ -177,7 +177,6 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct rockchip_dfi *data;
> - struct resource *res;
> struct devfreq_event_desc *desc;
> struct device_node *np = pdev->dev.of_node, *node;
>
> @@ -185,8 +184,7 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
> if (!data)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - data->regs = devm_ioremap_resource(&pdev->dev, res);
> + data->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(data->regs))
> return PTR_ERR(data->regs);
>
> --
> 2.17.1
>
Applied it.
--
Best Regards,
Chanwoo Choi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-15 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15 13:53 [PATCH] PM / devfreq: rockchip-dfi: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-15 15:31 ` Chanwoo Choi
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).