diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-08-31 16:59:03 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-09-01 12:43:25 +0300 |
commit | 23019ff2c9dc7196badad828d7c68a0b9c4ede92 (patch) | |
tree | 259eda86ebdbb0ce0e1b7b216a6361cc8ef77787 /drivers/gpu/drm/vc4/vc4_drv.c | |
parent | 4c216f0da88e3e7b4412a69abfda78fdfe62dca1 (diff) | |
download | linux-23019ff2c9dc7196badad828d7c68a0b9c4ede92.tar.xz |
drm/vc4: 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 <caihuoqing@baidu.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210831135903.4931-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_drv.c | 6 |
1 files 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; |