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); }