From patchwork Wed Apr 10 06:47:28 2019 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: 10893249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41E2314DB for ; Wed, 10 Apr 2019 06:48:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 272A02897A for ; Wed, 10 Apr 2019 06:48:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AB9B289E5; Wed, 10 Apr 2019 06:48:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B75CB2897A for ; Wed, 10 Apr 2019 06:48:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728109AbfDJGsB (ORCPT ); Wed, 10 Apr 2019 02:48:01 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:34226 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726838AbfDJGsB (ORCPT ); Wed, 10 Apr 2019 02:48:01 -0400 X-UUID: e8285f07ad20495e9425662108bf1766-20190410 X-UUID: e8285f07ad20495e9425662108bf1766-20190410 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 864879019; Wed, 10 Apr 2019 14:47:50 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 10 Apr 2019 14:47:47 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 10 Apr 2019 14:47:45 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman CC: Mathias Nyman , Matthias Brugger , Chunfeng Yun , Marek Szyprowski , , , , , Peter Chen Subject: [v2 PATCH 5/6] usb: chipidea: msm: get optional clock by devm_clk_get_optional() Date: Wed, 10 Apr 2019 14:47:28 +0800 Message-ID: <4fb0c15fc9e21307daceb9d26f20d87b4e0728d8.1554877692.git.chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use devm_clk_get_optional() to get optional clock Cc: Peter Chen Signed-off-by: Chunfeng Yun Acked-by: Peter Chen --- v2: add Acked-by Peter Chen --- drivers/usb/chipidea/ci_hdrc_msm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index 880009987460..b8b3caad889c 100644 --- a/drivers/usb/chipidea/ci_hdrc_msm.c +++ b/drivers/usb/chipidea/ci_hdrc_msm.c @@ -205,12 +205,9 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev) if (IS_ERR(clk)) return PTR_ERR(clk); - ci->fs_clk = clk = devm_clk_get(&pdev->dev, "fs"); - if (IS_ERR(clk)) { - if (PTR_ERR(clk) == -EPROBE_DEFER) - return -EPROBE_DEFER; - ci->fs_clk = NULL; - } + ci->fs_clk = clk = devm_clk_get_optional(&pdev->dev, "fs"); + if (IS_ERR(clk)) + return PTR_ERR(clk); res = platform_get_resource(pdev, IORESOURCE_MEM, 1); ci->base = devm_ioremap_resource(&pdev->dev, res);