From patchwork Mon May 28 14:36:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 10433039 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 28211602CC for ; Mon, 28 May 2018 14:36:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18FE9289FA for ; Mon, 28 May 2018 14:36:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D506289FD; Mon, 28 May 2018 14:36:32 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 6BC8B289FA for ; Mon, 28 May 2018 14:36:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161553AbeE1Oga (ORCPT ); Mon, 28 May 2018 10:36:30 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:56456 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968924AbeE1Og0 (ORCPT ); Mon, 28 May 2018 10:36:26 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4SEaOxB005758; Mon, 28 May 2018 09:36:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1527518184; bh=X/irt85xPu9oznaPjCoAoABOjiI7N1NVnPM6CfK3y2U=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ipkQjug1fvSc8rbeoZLLkiK3B9hf0lQf9QJQY/BUS0/7bBEWQWW65m+Di6IgbfDpF leG9EGJN6b3BhlmJwVEFNcd+yG7ndzh+3TXDvhoAnvL+0KiJDj4mxQMT0eDHv45WJY e5o+iEYAHHn3DA4H4NY8zi56KAmsYF7wpvfE5Yeg= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4SEaOFT021756; Mon, 28 May 2018 09:36:24 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 28 May 2018 09:36:24 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 28 May 2018 09:36:24 -0500 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4SEaOEb001885; Mon, 28 May 2018 09:36:24 -0500 Received: from lta0400828d.ti.com (vboxa0400828d.emea.dhcp.ti.com [172.22.236.98]) by dlelxv97.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4SEaKPL014400; Mon, 28 May 2018 09:36:22 -0500 From: Roger Quadros To: CC: , , Roger Quadros Subject: [PATCH 2/2] usb: dwc3: of_simple: don't call pm_runtime_set_active() Date: Mon, 28 May 2018 17:36:14 +0300 Message-ID: <1527518174-27860-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527518174-27860-1-git-send-email-rogerq@ti.com> References: <1527518174-27860-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 Don't call pm_runtime_set_active() as it will prevent the device from being activated in the next pm_runtime_get_sync() call. Also call pm_runtime_get_sync() before of_platform_populate(). Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-of-simple.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index e98d221..2cbb5c0 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -121,6 +121,9 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) if (ret) goto err_resetc_assert; + pm_runtime_enable(dev); + pm_runtime_get_sync(dev); + ret = of_platform_populate(np, NULL, NULL, dev); if (ret) { for (i = 0; i < simple->num_clocks; i++) { @@ -131,10 +134,6 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) goto err_resetc_assert; } - pm_runtime_set_active(dev); - pm_runtime_enable(dev); - pm_runtime_get_sync(dev); - return 0; err_resetc_assert: