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

drm/meson: Make use of the helper function devm_platform_ioremap_resourcexxx()

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

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>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210831135644.4576-1-caihuoqing@baidu.com

authored by

Cai Huoqing and committed by
Neil Armstrong
d4cb82aa 9eeb7b4e

+2 -5
+1 -2
drivers/gpu/drm/meson/meson_drv.c
··· 206 206 priv->compat = match->compat; 207 207 priv->afbcd.ops = match->afbcd_ops; 208 208 209 - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vpu"); 210 - regs = devm_ioremap_resource(dev, res); 209 + regs = devm_platform_ioremap_resource_byname(pdev, "vpu"); 211 210 if (IS_ERR(regs)) { 212 211 ret = PTR_ERR(regs); 213 212 goto free_drm;
+1 -3
drivers/gpu/drm/meson/meson_dw_hdmi.c
··· 978 978 struct dw_hdmi_plat_data *dw_plat_data; 979 979 struct drm_bridge *next_bridge; 980 980 struct drm_encoder *encoder; 981 - struct resource *res; 982 981 int irq; 983 982 int ret; 984 983 ··· 1041 1042 return PTR_ERR(meson_dw_hdmi->hdmitx_phy); 1042 1043 } 1043 1044 1044 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1045 - meson_dw_hdmi->hdmitx = devm_ioremap_resource(dev, res); 1045 + meson_dw_hdmi->hdmitx = devm_platform_ioremap_resource(pdev, 0); 1046 1046 if (IS_ERR(meson_dw_hdmi->hdmitx)) 1047 1047 return PTR_ERR(meson_dw_hdmi->hdmitx); 1048 1048