From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753772AbdIFK4m (ORCPT ); Wed, 6 Sep 2017 06:56:42 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:32472 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500AbdIFK4i (ORCPT ); Wed, 6 Sep 2017 06:56:38 -0400 Subject: Re: [PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn off clocks To: Keerthy , References: <1504694351-32358-1-git-send-email-j-keerthy@ti.com> CC: , , , From: Kishon Vijay Abraham I Message-ID: Date: Wed, 6 Sep 2017 16:26:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 06 September 2017 04:23 PM, Kishon Vijay Abraham I wrote: > Keerthy, > > On Wednesday 06 September 2017 04:09 PM, Keerthy wrote: >> Add shutdown handler to cleanly turn off clocks. > > one minor comment below.. with that fixed you can add my > > Acked-by: Kishon Vijay Abraham I >> >> Signed-off-by: Keerthy >> --- >> drivers/pci/dwc/pci-dra7xx.c | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c >> index d4e98f3..66d1cfe 100644 >> --- a/drivers/pci/dwc/pci-dra7xx.c >> +++ b/drivers/pci/dwc/pci-dra7xx.c >> @@ -874,6 +874,19 @@ static int dra7xx_pcie_suspend_noirq(struct device *dev) >> return 0; >> } >> >> +void dra7xx_pcie_shutdown(struct platform_device *pdev) >> +{ >> + struct dra7xx_pcie *dra7xx = dev_get_drvdata(&pdev->dev); > > Use struct device *dev = &pdev->dev, instead of de-referencing device pointer > multiple times. You might also have to dra7xx_pcie_stop_link() before disabling the clocks. Thanks Kishon