2021-08-31 13:57:49

by Cai,Huoqing

[permalink] [raw]
Subject: [PATCH] drm/bridge: cdns: Make use of the helper function devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <[email protected]>
---
drivers/gpu/drm/bridge/cdns-dsi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c
index e6e331071a00..d8a15c459b42 100644
--- a/drivers/gpu/drm/bridge/cdns-dsi.c
+++ b/drivers/gpu/drm/bridge/cdns-dsi.c
@@ -1171,7 +1171,6 @@ static int cdns_dsi_drm_probe(struct platform_device *pdev)
{
struct cdns_dsi *dsi;
struct cdns_dsi_input *input;
- struct resource *res;
int ret, irq;
u32 val;

@@ -1183,8 +1182,7 @@ static int cdns_dsi_drm_probe(struct platform_device *pdev)

input = &dsi->input;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dsi->regs = devm_ioremap_resource(&pdev->dev, res);
+ dsi->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dsi->regs))
return PTR_ERR(dsi->regs);

--
2.25.1


2021-08-31 14:03:31

by Andrzej Hajda

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge: cdns: Make use of the helper function devm_platform_ioremap_resource()


W dniu 31.08.2021 o 15:50, Cai Huoqing pisze:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>

Regards
Andrzej

2021-08-31 14:27:32

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH] drm/bridge: cdns: Make use of the helper function devm_platform_ioremap_resource()

On Tue, 31 Aug 2021 at 15:58, Andrzej Hajda <[email protected]> wrote:
>
>
> W dniu 31.08.2021 o 15:50, Cai Huoqing pisze:
> > Use the devm_platform_ioremap_resource() helper instead of
> > calling platform_get_resource() and devm_ioremap_resource()
> > separately
> >
> > Signed-off-by: Cai Huoqing <[email protected]>
> Reviewed-by: Andrzej Hajda <[email protected]>

Applied to drm-misc-next.