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;