* [PATCH] drm/vc4: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-08-31 13:59 Cai Huoqing
2021-09-01 9:43 ` Maxime Ripard
0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-08-31 13:59 UTC (permalink / raw)
To: caihuoqing
Cc: Emma Anholt, Maxime Ripard, David Airlie, Daniel Vetter,
dri-devel, linux-kernel
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
drivers/gpu/drm/vc4/vc4_drv.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index f6c16c5aee68..16abc3a3d601 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -50,13 +50,11 @@
#define DRIVER_PATCHLEVEL 0
/* Helper function for mapping the regs on a platform device. */
-void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index)
+void __iomem *vc4_ioremap_regs(struct platform_device *pdev, int index)
{
- struct resource *res;
void __iomem *map;
- res = platform_get_resource(dev, IORESOURCE_MEM, index);
- map = devm_ioremap_resource(&dev->dev, res);
+ map = devm_platform_ioremap_resource(pdev, index);
if (IS_ERR(map))
return map;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vc4: Make use of the helper function devm_platform_ioremap_resource()
2021-08-31 13:59 [PATCH] drm/vc4: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-09-01 9:43 ` Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2021-09-01 9:43 UTC (permalink / raw)
To: Cai Huoqing
Cc: Emma Anholt, David Airlie, Daniel Vetter, dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
On Tue, Aug 31, 2021 at 09:59:03PM +0800, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Applied, thanks
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-01 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:59 [PATCH] drm/vc4: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-01 9:43 ` Maxime Ripard
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).