diff mbox series

[3/3] drm/bridge: microchip-lvds: Use devm_platform_ioremap_resource()

Message ID 20240827161223.4152195-4-claudiu.beznea@tuxon.dev (mailing list archive)
State New, archived
Headers show
Series drm/bridge: microchip-lvds: Cleanups | expand

Commit Message

Claudiu Beznea Aug. 27, 2024, 4:12 p.m. UTC
The devm_platform_ioremap_resouce() does exactly what
devm_ioremap_resource() combined with platform_get_resouce() does.
Thus use it.

Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
---
 drivers/gpu/drm/bridge/microchip-lvds.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Dharma Balasubiramani Sept. 2, 2024, 4:39 a.m. UTC | #1
On 27/08/24 9:42 pm, Claudiu Beznea wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The devm_platform_ioremap_resouce() does exactly what
> devm_ioremap_resource() combined with platform_get_resouce() does.
> Thus use it.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Reviewed-and-tested-by: Dharma Balasubiramani <dharma.b@microchip.com>
> ---
>   drivers/gpu/drm/bridge/microchip-lvds.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/microchip-lvds.c b/drivers/gpu/drm/bridge/microchip-lvds.c
> index f04831106eea..85aff8c5aaf4 100644
> --- a/drivers/gpu/drm/bridge/microchip-lvds.c
> +++ b/drivers/gpu/drm/bridge/microchip-lvds.c
> @@ -154,8 +154,7 @@ static int mchp_lvds_probe(struct platform_device *pdev)
> 
>          lvds->dev = dev;
> 
> -       lvds->regs = devm_ioremap_resource(lvds->dev,
> -                       platform_get_resource(pdev, IORESOURCE_MEM, 0));
> +       lvds->regs = devm_platform_ioremap_resource(pdev, 0);
>          if (IS_ERR(lvds->regs))
>                  return PTR_ERR(lvds->regs);
> 
> --
> 2.39.2
>
Dharma Balasubiramani Sept. 2, 2024, 8:35 a.m. UTC | #2
On 27/08/24 9:42 pm, Claudiu Beznea wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The devm_platform_ioremap_resouce() does exactly what
> devm_ioremap_resource() combined with platform_get_resouce() does.
> Thus use it.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Reviewed-by: Dharma Balasubiramani <dharma.b@microchip.com>
Tested-by: Dharma Balasubiramani <dharma.b@microchip.com>
> ---
>   drivers/gpu/drm/bridge/microchip-lvds.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/microchip-lvds.c b/drivers/gpu/drm/bridge/microchip-lvds.c
> index f04831106eea..85aff8c5aaf4 100644
> --- a/drivers/gpu/drm/bridge/microchip-lvds.c
> +++ b/drivers/gpu/drm/bridge/microchip-lvds.c
> @@ -154,8 +154,7 @@ static int mchp_lvds_probe(struct platform_device *pdev)
> 
>          lvds->dev = dev;
> 
> -       lvds->regs = devm_ioremap_resource(lvds->dev,
> -                       platform_get_resource(pdev, IORESOURCE_MEM, 0));
> +       lvds->regs = devm_platform_ioremap_resource(pdev, 0);
>          if (IS_ERR(lvds->regs))
>                  return PTR_ERR(lvds->regs);
> 
> --
> 2.39.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/microchip-lvds.c b/drivers/gpu/drm/bridge/microchip-lvds.c
index f04831106eea..85aff8c5aaf4 100644
--- a/drivers/gpu/drm/bridge/microchip-lvds.c
+++ b/drivers/gpu/drm/bridge/microchip-lvds.c
@@ -154,8 +154,7 @@  static int mchp_lvds_probe(struct platform_device *pdev)
 
 	lvds->dev = dev;
 
-	lvds->regs = devm_ioremap_resource(lvds->dev,
-			platform_get_resource(pdev, IORESOURCE_MEM, 0));
+	lvds->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(lvds->regs))
 		return PTR_ERR(lvds->regs);