Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2335269ybb; Sat, 30 Mar 2019 02:29:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwyGattnnlj5MaV5d0O9zoww+zuELXA6N7d762IUOnm450q//NerlM00E7BrUf/Lm+O4Ie X-Received: by 2002:a17:902:968b:: with SMTP id n11mr46455269plp.118.1553938183483; Sat, 30 Mar 2019 02:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553938183; cv=none; d=google.com; s=arc-20160816; b=ZSjkiY9fbmgbmd2CJK9ciAP0aHBMXEU+5tYx7laJ20qulWQC3XtPjKfqA18chZ+pnn A6t3scXJWZHSXrpmFw94AVQsX0r+i9FfFOZsgHP4sRO/dUTza1WAmLTirEVfXpOB6Z2E DzbBhiKQ9h9515cXIDbumzJq71av1E5dVlq81X2YYrgSSWZVNs01oNV4z6gGJ2/vul5p 8N/AAbLcMZmSQWuCIWBpKSvptV+v0aEXl6MdtQlHPpPHDmnybrQ2wqG9dhnK72rwnOTv /RQh1X+lWKwuMdgxiXXT3OfB9RC4PNsjA4oWlixkDEMuwkr5ZSyxyNSfpztC3O/ax7BK wA8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=+y7e4LgyLeGEYFrME+qCkI3j2/Ve8AKdV4WteQ9fyrU=; b=poQBEGG16dQ86VnLFBhgBbJRntwCIZInentbHlq+ZWoi79+bg2jfeU+CioWmFQM2VN 3Y3Xm9Q3YywxYmlPPxFH7dDCgb6PpBLJHOaiwjdcCiCEvm70VgGfxFApw8S9CKyjO/xI G2T8Zwl1P9/j1sulurO0qBUrHgMPwx0eCdMlP+RpwQkbQAX1hFLThCTX9HNi+D0hEfUW yhiE9KATI3JUr1ZeFR7VyKVLihYSObBllR3+PbvvNdovYVytX+ias5hEHP4WrS1vV1MY X0EnbUNzCrvV3ow4zGkPGuZCJbUHA2TDOjPZt/Kch5Z/7BTCw52WCmjeEyqYZKXHOXeO aBYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 130si3926435pgc.256.2019.03.30.02.29.28; Sat, 30 Mar 2019 02:29:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730577AbfC3J2o (ORCPT + 99 others); Sat, 30 Mar 2019 05:28:44 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:60768 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730496AbfC3J2k (ORCPT ); Sat, 30 Mar 2019 05:28:40 -0400 X-UUID: 51dc95bf66cc4a7281098c1bb2aa1c16-20190330 X-UUID: 51dc95bf66cc4a7281098c1bb2aa1c16-20190330 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 25768377; Sat, 30 Mar 2019 17:28:35 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 30 Mar 2019 17:28:33 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 30 Mar 2019 17:28:33 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , , Peter Chen Subject: [PATCH 5/5] usb: chipidea: msm: get optional clock by devm_clk_get_optional() Date: Sat, 30 Mar 2019 17:28:20 +0800 Message-ID: <2f4b8d77c6ec99ef6cc8e71155d820e080ad9af5.1553937592.git.chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <2ec86ffd7de45dabaa7257019a79f1e80751934c.1553937592.git.chunfeng.yun@mediatek.com> References: <2ec86ffd7de45dabaa7257019a79f1e80751934c.1553937592.git.chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_clk_get_optional() to get optional clock Cc: Peter Chen Signed-off-by: Chunfeng Yun --- 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); -- 2.20.1