@@ -1111,8 +1111,7 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid,
/* Memory */
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res->reg[0]);
- csid->base = devm_ioremap_resource(dev, r);
+ csid->base = devm_platform_ioremap_resource_byname(pdev, res->reg[0]);
if (IS_ERR(csid->base)) {
dev_err(dev, "could not map memory\n");
return PTR_ERR(csid->base);
@@ -563,15 +563,13 @@ int msm_csiphy_subdev_init(struct camss *camss,
/* Memory */
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res->reg[0]);
- csiphy->base = devm_ioremap_resource(dev, r);
+ csiphy->base = devm_platform_ioremap_resource_byname(pdev, res->reg[0]);
if (IS_ERR(csiphy->base)) {
dev_err(dev, "could not map memory\n");
return PTR_ERR(csiphy->base);
}
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res->reg[1]);
- csiphy->base_clk_mux = devm_ioremap_resource(dev, r);
+ csiphy->base_clk_mux = devm_platform_ioremap_resource_byname(pdev, res->reg[1]);
if (IS_ERR(csiphy->base_clk_mux)) {
dev_err(dev, "could not map memory\n");
return PTR_ERR(csiphy->base_clk_mux);
@@ -1131,15 +1131,13 @@ int msm_ispif_subdev_init(struct ispif_device *ispif,
/* Memory */
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res->reg[0]);
- ispif->base = devm_ioremap_resource(dev, r);
+ ispif->base = devm_platform_ioremap_resource_byname(pdev, res->reg[0]);
if (IS_ERR(ispif->base)) {
dev_err(dev, "could not map memory\n");
return PTR_ERR(ispif->base);
}
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res->reg[1]);
- ispif->base_clk_mux = devm_ioremap_resource(dev, r);
+ ispif->base_clk_mux = devm_platform_ioremap_resource_byname(pdev, res->reg[1]);
if (IS_ERR(ispif->base_clk_mux)) {
dev_err(dev, "could not map memory\n");
return PTR_ERR(ispif->base_clk_mux);
@@ -2008,8 +2008,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
/* Memory */
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res->reg[0]);
- vfe->base = devm_ioremap_resource(dev, r);
+ vfe->base = devm_platform_ioremap_resource_byname(pdev, res->reg[0]);
if (IS_ERR(vfe->base)) {
dev_err(dev, "could not map memory\n");
return PTR_ERR(vfe->base);