static int omap_control_phy_probe(struct platform_device *pdev)
 {
-       struct resource *res;
        const struct of_device_id *of_id;
        struct omap_control_phy *control_phy;
 
        control_phy->type = *(enum omap_control_phy_type *)of_id->data;
 
        if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) {
-               res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-                       "otghs_control");
-               control_phy->otghs_control = devm_ioremap_resource(
-                       &pdev->dev, res);
+               control_phy->otghs_control =
+                       devm_platform_ioremap_resource_byname(pdev, "otghs_control");
                if (IS_ERR(control_phy->otghs_control))
                        return PTR_ERR(control_phy->otghs_control);
        } else {
-               res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-                               "power");
-               control_phy->power = devm_ioremap_resource(&pdev->dev, res);
+               control_phy->power =
+                       devm_platform_ioremap_resource_byname(pdev, "power");
                if (IS_ERR(control_phy->power)) {
                        dev_err(&pdev->dev, "Couldn't get power register\n");
                        return PTR_ERR(control_phy->power);
        }
 
        if (control_phy->type == OMAP_CTRL_TYPE_PCIE) {
-               res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-                                                  "pcie_pcs");
-               control_phy->pcie_pcs = devm_ioremap_resource(&pdev->dev, res);
+               control_phy->pcie_pcs =
+                       devm_platform_ioremap_resource_byname(pdev, "pcie_pcs");
                if (IS_ERR(control_phy->pcie_pcs))
                        return PTR_ERR(control_phy->pcie_pcs);
        }
 
 {
        struct omap_usb *phy;
        struct phy *generic_phy;
-       struct resource *res;
        struct phy_provider *phy_provider;
        struct usb_otg *otg;
        struct device_node *node = pdev->dev.of_node;
 
        omap_usb2_init_errata(phy);
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       phy->phy_base = devm_ioremap_resource(&pdev->dev, res);
+       phy->phy_base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(phy->phy_base))
                return PTR_ERR(phy->phy_base);
 
 
 
 static int ti_pipe3_get_tx_rx_base(struct ti_pipe3 *phy)
 {
-       struct resource *res;
        struct device *dev = phy->dev;
        struct platform_device *pdev = to_platform_device(dev);
 
-       res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-                                          "phy_rx");
-       phy->phy_rx = devm_ioremap_resource(dev, res);
+       phy->phy_rx = devm_platform_ioremap_resource_byname(pdev, "phy_rx");
        if (IS_ERR(phy->phy_rx))
                return PTR_ERR(phy->phy_rx);
 
-       res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-                                          "phy_tx");
-       phy->phy_tx = devm_ioremap_resource(dev, res);
+       phy->phy_tx = devm_platform_ioremap_resource_byname(pdev, "phy_tx");
 
        return PTR_ERR_OR_ZERO(phy->phy_tx);
 }
 
 static int ti_pipe3_get_pll_base(struct ti_pipe3 *phy)
 {
-       struct resource *res;
        struct device *dev = phy->dev;
        struct platform_device *pdev = to_platform_device(dev);
 
        if (phy->mode == PIPE3_MODE_PCIE)
                return 0;
 
-       res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-                                          "pll_ctrl");
-       phy->pll_ctrl_base = devm_ioremap_resource(dev, res);
+       phy->pll_ctrl_base =
+               devm_platform_ioremap_resource_byname(pdev, "pll_ctrl");
        return PTR_ERR_OR_ZERO(phy->pll_ctrl_base);
 }