Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Cai Huoqing and committed by
Maxime Ripard
23019ff2 4c216f0d

+2 -4
+2 -4
drivers/gpu/drm/vc4/vc4_drv.c
··· 50 50 #define DRIVER_PATCHLEVEL 0 51 51 52 52 /* Helper function for mapping the regs on a platform device. */ 53 - void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index) 53 + void __iomem *vc4_ioremap_regs(struct platform_device *pdev, int index) 54 54 { 55 - struct resource *res; 56 55 void __iomem *map; 57 56 58 - res = platform_get_resource(dev, IORESOURCE_MEM, index); 59 - map = devm_ioremap_resource(&dev->dev, res); 57 + map = devm_platform_ioremap_resource(pdev, index); 60 58 if (IS_ERR(map)) 61 59 return map; 62 60