未验证 提交 23019ff2 编写于 作者: C Cai Huoqing 提交者: Maxime Ripard

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: NCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210831135903.4931-1-caihuoqing@baidu.com
上级 4c216f0d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册