@@ -1605,9 +1605,7 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
return ERR_CAST(dp->clock);
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- dp->reg_base = devm_ioremap_resource(&pdev->dev, res);
+ dp->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(dp->reg_base)) {
ret = PTR_ERR(dp->reg_base);
goto err_disable_clk;
@@ -151,6 +151,7 @@ static int mchp_lvds_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct mchp_lvds *lvds;
struct device_node *port;
+ struct resource *res;
int ret;
if (!dev->of_node)
@@ -161,9 +162,7 @@ static int mchp_lvds_probe(struct platform_device *pdev)
return -ENOMEM;
lvds->dev = dev;
-
- lvds->regs = devm_ioremap_resource(lvds->dev,
- platform_get_resource(pdev, IORESOURCE_MEM, 0));
+ lvds->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(lvds->regs))
return PTR_ERR(lvds->regs);
@@ -3386,8 +3386,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
return ERR_PTR(-EINVAL);
}
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hdmi->regs = devm_ioremap_resource(dev, iores);
+ hdmi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &iores);
if (IS_ERR(hdmi->regs)) {
ret = PTR_ERR(hdmi->regs);
goto err_res;