From patchwork Mon May 22 11:23:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 9739951 X-Patchwork-Delegate: agross@codeaurora.org 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 610526034C for ; Mon, 22 May 2017 11:23:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FF4028415 for ; Mon, 22 May 2017 11:23:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 446382850F; Mon, 22 May 2017 11:23:57 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 CAECA28415 for ; Mon, 22 May 2017 11:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759157AbdEVLXw (ORCPT ); Mon, 22 May 2017 07:23:52 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37736 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759151AbdEVLXt (ORCPT ); Mon, 22 May 2017 07:23:49 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 33F4160A0E; Mon, 22 May 2017 11:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1495452223; bh=nSR8P1uUkvlP4m4xmkacOFR1x9bpSh9iUcnjZWkPX1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F9APJH9/hGzTzOxkmVsqcDCdCiuQU6E7AE9ZsoKACUQHFxqVd3Az/lbiw9EUzcECG VdyRwuDEKriud+ln/dx/yM8qVAooTqiV/AwYF4vvXPIOo28iVlRhBsgyOYwRK74YZo aT2Kx9FDvgCcbr11k1S4dLXMWMqdcMgwDkpXTsn4= Received: from blr-ubuntu-41.ap.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0BE6A60A37; Mon, 22 May 2017 11:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1495452222; bh=nSR8P1uUkvlP4m4xmkacOFR1x9bpSh9iUcnjZWkPX1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aAdvODRd9ioPsG7qsA+pAJzrWAZaRe9Y6qHNQNwuBFOizs31RrT/AbskkPQfM35mB W7Ish//oNa76k1mRctqG6KkUJUn7OYufI3oucdWUD0jvPQ86pDsq2mwDsxZXPQzCAd q1KBpvW70jHkD7Spu6rEvWjapGEJzuN7oebHd8KM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0BE6A60A37 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: p.zabel@pengutronix.de, linux-kernel@vger.kernel.org Cc: linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, jonathanh@nvidia.com, balbi@kernel.org, gregkh@linuxfoundation.org, linux-arm-msm@vger.kernel.org, Vivek Gautam Subject: [PATCH v4 1/4] usb: dwc3: of-simple: Re-order resource handling in remove Date: Mon, 22 May 2017 16:53:24 +0530 Message-Id: <1495452207-6129-2-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1495452207-6129-1-git-send-email-vivek.gautam@codeaurora.org> References: <1495452207-6129-1-git-send-email-vivek.gautam@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move clock handling after of_platform_depopulate to achieve a sequence that is reverse of the probe sequence. Cc: Felipe Balbi Signed-off-by: Vivek Gautam --- - new patch in this series. drivers/usb/dwc3/dwc3-of-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index fe414e7a9c78..a9bac09d3750 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -123,13 +123,13 @@ static int dwc3_of_simple_remove(struct platform_device *pdev) struct device *dev = &pdev->dev; int i; + of_platform_depopulate(dev); + for (i = 0; i < simple->num_clocks; i++) { clk_disable_unprepare(simple->clks[i]); clk_put(simple->clks[i]); } - of_platform_depopulate(dev); - pm_runtime_put_sync(dev); pm_runtime_disable(dev);