Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751680AbbKIN5a (ORCPT ); Mon, 9 Nov 2015 08:57:30 -0500 Received: from mail-yk0-f178.google.com ([209.85.160.178]:34156 "EHLO mail-yk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbbKIN52 (ORCPT ); Mon, 9 Nov 2015 08:57:28 -0500 MIME-Version: 1.0 In-Reply-To: <1447075429-27311-2-git-send-email-jonathanh@nvidia.com> References: <1447075429-27311-1-git-send-email-jonathanh@nvidia.com> <1447075429-27311-2-git-send-email-jonathanh@nvidia.com> Date: Mon, 9 Nov 2015 15:57:28 +0200 Message-ID: Subject: Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage From: Andy Shevchenko To: Jon Hunter Cc: Laxman Dewangan , Vinod Koul , Stephen Warren , Thierry Reding , Alexandre Courbot , dmaengine , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1436 Lines: 39 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? -- With Best Regards, Andy Shevchenko -- 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/