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