Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbbKJJ5c (ORCPT ); Tue, 10 Nov 2015 04:57:32 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:16744 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751998AbbKJJ51 (ORCPT ); Tue, 10 Nov 2015 04:57:27 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 10 Nov 2015 01:55:13 -0800 Subject: Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage To: Andy Shevchenko References: <1447075429-27311-1-git-send-email-jonathanh@nvidia.com> <1447075429-27311-2-git-send-email-jonathanh@nvidia.com> CC: Laxman Dewangan , Vinod Koul , Stephen Warren , Thierry Reding , Alexandre Courbot , dmaengine , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Jon Hunter Message-ID: <5641BF7F.9000809@nvidia.com> Date: Tue, 10 Nov 2015 09:57:19 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.21.132.108] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1526 Lines: 44 On 09/11/15 13:57, Andy Shevchenko wrote: > On Mon, Nov 9, 2015 at 3:23 PM, Jon Hunter wrote: >> The tegra-apb DMA driver enables runtime-pm but never calls >> pm_runtime_get/put and hence the runtime-pm callbacks are never invoked. >> The driver manages the clocks by directly calling clk_prepare_enable() >> and clk_unprepare_disable(). >> >> Fix this by replacing the clk_prepare_enable() and clk_disable_unprepare() >> with pm_runtime_get_sync() and pm_runtime_put(), respectively. Note that >> the consequence of this is that if runtime-pm is disabled, then the clocks >> will remain on the entire time the driver is loaded. However, if >> runtime-pm is disabled, then power is not most likely not a concern. > > Nitpick > >> @@ -1539,11 +1534,10 @@ static int tegra_dma_runtime_resume(struct device *dev) >> static int tegra_dma_pm_suspend(struct device *dev) >> { >> struct tegra_dma *tdma = dev_get_drvdata(dev); >> - int i; >> - int ret; >> + int i, ret; > >> static int tegra_dma_pm_resume(struct device *dev) >> { >> struct tegra_dma *tdma = dev_get_drvdata(dev); >> - int i; >> - int ret; >> + int i, ret; > > Do you really need that? Rhetorical question? ;-) I can drop that. Jon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/