diff options
Diffstat (limited to 'drivers/usb/mtu3')
-rw-r--r-- | drivers/usb/mtu3/mtu3_core.c | 4 | ||||
-rw-r--r-- | drivers/usb/mtu3/mtu3_plat.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c index 6d515eb67ea7..9c49160138f2 100644 --- a/drivers/usb/mtu3/mtu3_core.c +++ b/drivers/usb/mtu3/mtu3_core.c @@ -828,7 +828,6 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb) struct device *dev = ssusb->dev; struct platform_device *pdev = to_platform_device(dev); struct mtu3 *mtu = NULL; - struct resource *res; int ret = -ENOMEM; mtu = devm_kzalloc(dev, sizeof(struct mtu3), GFP_KERNEL); @@ -840,8 +839,7 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb) return mtu->irq; dev_info(dev, "irq %d\n", mtu->irq); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mac"); - mtu->mac_base = devm_ioremap_resource(dev, res); + mtu->mac_base = devm_platform_ioremap_resource_byname(pdev, "mac"); if (IS_ERR(mtu->mac_base)) { dev_err(dev, "error mapping memory for dev mac\n"); return PTR_ERR(mtu->mac_base); diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index 9c256ea3cdf5..d44d5417438d 100644 --- a/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c @@ -216,7 +216,6 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) struct device_node *node = pdev->dev.of_node; struct otg_switch_mtk *otg_sx = &ssusb->otg_switch; struct device *dev = &pdev->dev; - struct resource *res; int i; int ret; @@ -263,8 +262,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) } } - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ippc"); - ssusb->ippc_base = devm_ioremap_resource(dev, res); + ssusb->ippc_base = devm_platform_ioremap_resource_byname(pdev, "ippc"); if (IS_ERR(ssusb->ippc_base)) return PTR_ERR(ssusb->ippc_base); |