From patchwork Wed Jul 22 07:51:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11677649 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 952A8159A for ; Wed, 22 Jul 2020 07:53:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BE08207DD for ; Wed, 22 Jul 2020 07:53:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="cYgEm/dz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727776AbgGVHws (ORCPT ); Wed, 22 Jul 2020 03:52:48 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:58309 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726147AbgGVHwr (ORCPT ); Wed, 22 Jul 2020 03:52:47 -0400 X-UUID: 1574de30e5b14a2e8b656c2805101215-20200722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=N12xt2Ho95K/5t9BUmiiTcsZXRkp+alJpZRZ6ri1tVs=; b=cYgEm/dz84dfE+Hrt4CMHh7NZJVt4g1dVajgdZidn1fuVihNtlUh/DXfniavf6VOwU27PbmNgfqctAeIpQEWoZH5sCJTvu4TstM+L51bFvTvbamIdcISxgBd9TsDQDjTZmSMBuFYnBZxX1GK0IFBjPI8+DOeQxZ9SZlhAyDpk3M=; X-UUID: 1574de30e5b14a2e8b656c2805101215-20200722 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1378471531; Wed, 22 Jul 2020 15:52:40 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 15:52:34 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jul 2020 15:52:34 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , Subject: [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Date: Wed, 22 Jul 2020 15:51:09 +0800 Message-ID: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-TM-SNTS-SMTP: 5EF873A7262642D7730EE5F21BCAD020E82C724D4756E7F4B20C7F02D98FE49B2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 4 +--- 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 9dd0216..ca48089 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 9c256ea..d44d541 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); From patchwork Wed Jul 22 07:51:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11677637 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8084013B6 for ; Wed, 22 Jul 2020 07:52:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63BAE20792 for ; Wed, 22 Jul 2020 07:52:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="LkDOlyLS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726317AbgGVHwn (ORCPT ); Wed, 22 Jul 2020 03:52:43 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:22530 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726147AbgGVHwn (ORCPT ); Wed, 22 Jul 2020 03:52:43 -0400 X-UUID: 9e51686874a141e4bd91569b9cc8aec6-20200722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=bsR4oIGCIYaOleiklZSpqTGoJRJab0JcJpe1Y+wzSDc=; b=LkDOlyLSWi+7ZU9UhdFQ9j8xni92/9uUfhAfXtTT2PfPS/fuoVUuX/e6rKPibFmya0scX5n3gWkNZgvG78qpAzdGsuYw36a+Yf/TFSayU6PBpQ2CZwiXA/N/aQx2/rNK1/Av2FUis8V+pfqUuZjEtV6ni7XXk6tpv9ljw49u9qs=; X-UUID: 9e51686874a141e4bd91569b9cc8aec6-20200722 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 3796830; Wed, 22 Jul 2020 15:52:38 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 15:52:35 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jul 2020 15:52:35 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , Subject: [PATCH 2/7] usb: phy: am335x: convert to devm_platform_ioremap_resource_byname Date: Wed, 22 Jul 2020 15:51:10 +0800 Message-ID: <1595404275-8449-2-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> References: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 9DB988DD4C58F5E8BA918A198B50C04108DA7A734B2DAD79509251980A3C6FA22000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/phy/phy-am335x-control.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c index d16dfc3..97e6603 100644 --- a/drivers/usb/phy/phy-am335x-control.c +++ b/drivers/usb/phy/phy-am335x-control.c @@ -149,7 +149,6 @@ struct phy_control *am335x_get_phy_control(struct device *dev) static int am335x_control_usb_probe(struct platform_device *pdev) { - struct resource *res; struct am335x_control_usb *ctrl_usb; const struct of_device_id *of_id; const struct phy_control *phy_ctrl; @@ -166,13 +165,11 @@ static int am335x_control_usb_probe(struct platform_device *pdev) ctrl_usb->dev = &pdev->dev; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy_ctrl"); - ctrl_usb->phy_reg = devm_ioremap_resource(&pdev->dev, res); + ctrl_usb->phy_reg = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl"); if (IS_ERR(ctrl_usb->phy_reg)) return PTR_ERR(ctrl_usb->phy_reg); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wakeup"); - ctrl_usb->wkup = devm_ioremap_resource(&pdev->dev, res); + ctrl_usb->wkup = devm_platform_ioremap_resource_byname(pdev, "wakeup"); if (IS_ERR(ctrl_usb->wkup)) return PTR_ERR(ctrl_usb->wkup); From patchwork Wed Jul 22 07:51:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11677653 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D9E913A4 for ; Wed, 22 Jul 2020 07:53:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B3F2207DD for ; Wed, 22 Jul 2020 07:53:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="fQQCyUWL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbgGVHws (ORCPT ); Wed, 22 Jul 2020 03:52:48 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:22530 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726526AbgGVHwo (ORCPT ); Wed, 22 Jul 2020 03:52:44 -0400 X-UUID: 4af21b77ba8b45f3aa3cb7da99b38b03-20200722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=DzLbxVmfz4p8SnXE39iLTjM9Eg3NjzAAkC6OgKq9s2Y=; b=fQQCyUWLoojLdmVB8lV//KQ3ZiKGVDLbpVNB6bE41BUSawdMilO0OF8r3rRNDaJtY3wQ+WVw445lmBZa7b/onpRovGO4rn8VKslkA+3kLrFYEX22ZJ8gxgFfpNLsvdWHlTkFWN0yzXbEYO2+ajeWMRolXHxWtwzjWwy51khK7kI=; X-UUID: 4af21b77ba8b45f3aa3cb7da99b38b03-20200722 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1405016726; Wed, 22 Jul 2020 15:52:40 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 15:52:37 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jul 2020 15:52:36 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , , Peter Chen Subject: [PATCH 3/7] usb: cdns3: convert to devm_platform_ioremap_resource_byname Date: Wed, 22 Jul 2020 15:51:11 +0800 Message-ID: <1595404275-8449-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> References: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 503C198B2435FDCC3DD173599FA78F640BA603A4194983A6353A7E3F5D0E743C2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use devm_platform_ioremap_resource_byname() to simplify code Cc: Peter Chen Signed-off-by: Chunfeng Yun Reviewed-by: Peter Chen --- drivers/usb/cdns3/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index 19bbb5b..24faf60 100644 --- a/drivers/usb/cdns3/core.c +++ b/drivers/usb/cdns3/core.c @@ -436,8 +436,7 @@ static int cdns3_probe(struct platform_device *pdev) if (cdns->dev_irq < 0) dev_err(dev, "couldn't get peripheral irq\n"); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dev"); - regs = devm_ioremap_resource(dev, res); + regs = devm_platform_ioremap_resource_byname(pdev, "dev"); if (IS_ERR(regs)) return PTR_ERR(regs); cdns->dev_regs = regs; From patchwork Wed Jul 22 07:51:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11677651 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9BB2113A4 for ; Wed, 22 Jul 2020 07:53:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79FD7207DD for ; Wed, 22 Jul 2020 07:53:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="dPOjE8IF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728283AbgGVHxD (ORCPT ); Wed, 22 Jul 2020 03:53:03 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:23115 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726821AbgGVHws (ORCPT ); Wed, 22 Jul 2020 03:52:48 -0400 X-UUID: bd70cc3ec72941578030385d60c997ba-20200722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=cfYm60Altq9Wqji4CsoqqXRvsmV3rfZV2KW7eN4V7sM=; b=dPOjE8IFfuE30mdLcjqGG+DjwiaOmJciHFltBQiqd3tRO4zzkOrYVYu1fFbJD+iTYeKRFoZ0BO6Nm6cXvz9oqIyAEDrCoKRSgD9yl2wqXsgWfTJCq9eyMBwZtv0LZ+AZaXZssC11sc7uIWhj1leU+Uj9Eb33/K1RGbVXfT3nUIw=; X-UUID: bd70cc3ec72941578030385d60c997ba-20200722 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 305168531; Wed, 22 Jul 2020 15:52:40 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 15:52:38 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jul 2020 15:52:37 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , , Patrice Chotard Subject: [PATCH 4/7] usb: dwc3: convert to devm_platform_ioremap_resource_byname Date: Wed, 22 Jul 2020 15:51:12 +0800 Message-ID: <1595404275-8449-4-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> References: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 476947B2B4033799B8766523F97A3126D70D8C4018667E0F265131D97B0086FE2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use devm_platform_ioremap_resource_byname() to simplify code Cc: Patrice Chotard Signed-off-by: Chunfeng Yun Reviewed-by: Patrice Chotard --- drivers/usb/dwc3/dwc3-st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index c682420..e733be8 100644 --- a/drivers/usb/dwc3/dwc3-st.c +++ b/drivers/usb/dwc3/dwc3-st.c @@ -206,8 +206,8 @@ static int st_dwc3_probe(struct platform_device *pdev) if (!dwc3_data) return -ENOMEM; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "reg-glue"); - dwc3_data->glue_base = devm_ioremap_resource(dev, res); + dwc3_data->glue_base = + devm_platform_ioremap_resource_byname(pdev, "reg-glue"); if (IS_ERR(dwc3_data->glue_base)) return PTR_ERR(dwc3_data->glue_base); From patchwork Wed Jul 22 07:51:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11677647 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E83EC13B6 for ; Wed, 22 Jul 2020 07:53:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5E7F22C9C for ; Wed, 22 Jul 2020 07:53:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="Oj+MFCr6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727818AbgGVHwt (ORCPT ); Wed, 22 Jul 2020 03:52:49 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:22238 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726895AbgGVHws (ORCPT ); Wed, 22 Jul 2020 03:52:48 -0400 X-UUID: 12d826cbb69c465a822a3bdc72cd5e9d-20200722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=CzXt417YZnXp+qjSl1yfPPQkC34rFngVIJsdn7hXNvo=; b=Oj+MFCr61Z9eVqR9p9toHWG4sjS+ge/IpQOiZwdHAWmntMDx2/perapmmSNYthbmqHtuDWZiUMckvkh098MSwkjzU1B7So1MSWy1jhC03wskpHV4D90QG7V12tzZ5ybIfPjCuI/nDa2ROYQm5LouDwNMajhzxFgNgEBH8ewcEmw=; X-UUID: 12d826cbb69c465a822a3bdc72cd5e9d-20200722 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1757700144; Wed, 22 Jul 2020 15:52:41 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 15:52:39 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jul 2020 15:52:38 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , Subject: [PATCH 5/7] usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname Date: Wed, 22 Jul 2020 15:51:13 +0800 Message-ID: <1595404275-8449-5-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> References: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: D92B4937737A2A49E37ED71097E5A8B9967C95846982E2A375FDC7CCE8515C882000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/r8a66597-udc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index 537094b4..896c1a0 100644 --- a/drivers/usb/gadget/udc/r8a66597-udc.c +++ b/drivers/usb/gadget/udc/r8a66597-udc.c @@ -1827,10 +1827,8 @@ static void nop_completion(struct usb_ep *ep, struct usb_request *r) static int r8a66597_sudmac_ioremap(struct r8a66597 *r8a66597, struct platform_device *pdev) { - struct resource *res; - - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sudmac"); - r8a66597->sudmac_reg = devm_ioremap_resource(&pdev->dev, res); + r8a66597->sudmac_reg = + devm_platform_ioremap_resource_byname(pdev, "sudmac"); return PTR_ERR_OR_ZERO(r8a66597->sudmac_reg); } From patchwork Wed Jul 22 07:51:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11677639 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 915C513A4 for ; Wed, 22 Jul 2020 07:52:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 788F3207BB for ; Wed, 22 Jul 2020 07:52:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="B0xiaxc6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728059AbgGVHwx (ORCPT ); Wed, 22 Jul 2020 03:52:53 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:61315 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726870AbgGVHww (ORCPT ); Wed, 22 Jul 2020 03:52:52 -0400 X-UUID: 8ac798eac069470899699dfdeb82f262-20200722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=qwTImn/8K9LJnphZrWhb4BjXDRmrvFi/Lz39VCoRDJc=; b=B0xiaxc6mxBUfm3hNd6geXRbRag79XZcTwiKFaxtiBYE2z2AUwGkqVwj2a+Xyy/ngtY0l6of9H9FOcSO3lHDmIqRjDMTEH98ozygU0J1lVIoOmFYiy4kb2xLssz7iNho4q3oizJDnSKe4mjVpE+jZPJFg3Z+oynjx5/K9EXgWG8=; X-UUID: 8ac798eac069470899699dfdeb82f262-20200722 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1730592382; Wed, 22 Jul 2020 15:52:42 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 15:52:40 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jul 2020 15:52:39 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , , Nagarjuna Kristam Subject: [PATCH 6/7] usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname Date: Wed, 22 Jul 2020 15:51:14 +0800 Message-ID: <1595404275-8449-6-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> References: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 40B6B90EE131EFAFFE5849A03C43ADD0B35715D3D998C073E94E47EE4221B35E2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use devm_platform_ioremap_resource_byname() to simplify code Cc: Nagarjuna Kristam Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/tegra-xudc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index bbe1a04..5a7c5cf 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -3750,15 +3750,12 @@ static int tegra_xudc_probe(struct platform_device *pdev) return PTR_ERR(xudc->base); xudc->phys_base = res->start; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fpci"); - xudc->fpci = devm_ioremap_resource(&pdev->dev, res); + xudc->fpci = devm_platform_ioremap_resource_byname(pdev, "fpci"); if (IS_ERR(xudc->fpci)) return PTR_ERR(xudc->fpci); if (xudc->soc->has_ipfs) { - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "ipfs"); - xudc->ipfs = devm_ioremap_resource(&pdev->dev, res); + xudc->ipfs = devm_platform_ioremap_resource_byname(pdev, "ipfs"); if (IS_ERR(xudc->ipfs)) return PTR_ERR(xudc->ipfs); } From patchwork Wed Jul 22 07:51:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11677645 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8255D13A4 for ; Wed, 22 Jul 2020 07:53:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 601E4207DD for ; Wed, 22 Jul 2020 07:53:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="DCmOCDSj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728173AbgGVHw6 (ORCPT ); Wed, 22 Jul 2020 03:52:58 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:60097 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726918AbgGVHw5 (ORCPT ); Wed, 22 Jul 2020 03:52:57 -0400 X-UUID: 8075ba6e7aeb4c5faff5964f498a3cfa-20200722 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=99UZb4f7F+/4F/IFBc3ZFmkJ8KG1G0s+LgXmC0/xZDg=; b=DCmOCDSjq2w8OLtsGABcwVDT3MABAVYCT8N+iAX2VzjwpvA3XhhQikFf7xBhRFhRUeAXOtY+OIKf8de/rQ5l9Fd3CBG5v8M+yJn1JGLekP3kT7wk9dz4oN4bXHjkSoLoQ7pRC0hDuJgRB9UekOtcWRBMgejLFWX2kcu2wuhVlAI=; X-UUID: 8075ba6e7aeb4c5faff5964f498a3cfa-20200722 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1626172078; Wed, 22 Jul 2020 15:52:43 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jul 2020 15:52:41 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jul 2020 15:52:41 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , , Bin Liu Subject: [PATCH 7/7] usb: musb: convert to devm_platform_ioremap_resource_byname Date: Wed, 22 Jul 2020 15:51:15 +0800 Message-ID: <1595404275-8449-7-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> References: <1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 7F14E68EA99D6182322EA789696377A2F1E81611215BB0820AC42407E7C14E2C2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use devm_platform_ioremap_resource_byname() to simplify code Cc: Bin Liu Signed-off-by: Chunfeng Yun --- drivers/usb/musb/musb_dsps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 8892317..9dbf977 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -429,12 +429,10 @@ static int dsps_musb_init(struct musb *musb) struct platform_device *parent = to_platform_device(dev->parent); const struct dsps_musb_wrapper *wrp = glue->wrp; void __iomem *reg_base; - struct resource *r; u32 rev, val; int ret; - r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control"); - reg_base = devm_ioremap_resource(dev, r); + reg_base = devm_platform_ioremap_resource_byname(parent, "control"); if (IS_ERR(reg_base)) return PTR_ERR(reg_base); musb->ctrl_base = reg_base;