Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752209AbcJIS2W (ORCPT ); Sun, 9 Oct 2016 14:28:22 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36863 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbcJIS2V (ORCPT ); Sun, 9 Oct 2016 14:28:21 -0400 MIME-Version: 1.0 In-Reply-To: <20161009172757.GA11916@kozik-lap> References: <1476023655-3232-1-git-send-email-linux.amoon@gmail.com> <20161009163446.GA9672@kozik-lap> <20161009172757.GA11916@kozik-lap> From: Anand Moon Date: Sun, 9 Oct 2016 23:57:59 +0530 Message-ID: Subject: Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS To: Krzysztof Kozlowski Cc: Alan Stern , Greg Kroah-Hartman , Kukjin Kim , Javier Martinez Canillas , Linux USB Mailing List , linux-arm-kernel , "linux-samsung-soc@vger.kernel.org" , Linux Kernel 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: 2245 Lines: 72 hi Krzysztof, On 9 October 2016 at 22:57, Krzysztof Kozlowski wrote: > On Sun, Oct 09, 2016 at 10:45:40PM +0530, Anand Moon wrote: >> Hi Krzysztof, >> >> On 9 October 2016 at 22:04, Krzysztof Kozlowski wrote: >> > On Sun, Oct 09, 2016 at 02:34:14PM +0000, Anand Moon wrote: >> >> Move the ehci-exynos system PM callbacks within #ifdef CONFIG_PM_SLEEP >> >> as to avoid them being build when not used. This also allows us to use the >> >> SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. >> >> >> >> Signed-off-by: Anand Moon >> >> --- >> >> drivers/usb/host/ehci-exynos.c | 14 ++++++-------- >> >> 1 file changed, 6 insertions(+), 8 deletions(-) >> >> >> >> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c >> >> index 42e5b66..1899900 100644 >> >> --- a/drivers/usb/host/ehci-exynos.c >> >> +++ b/drivers/usb/host/ehci-exynos.c >> >> @@ -251,7 +251,7 @@ static int exynos_ehci_remove(struct platform_device *pdev) >> >> return 0; >> >> } >> >> >> >> -#ifdef CONFIG_PM >> >> +#ifdef CONFIG_PM_SLEEP >> > >> > Does not look like an equivalent change. How will it behave in a config >> > with !SUSPEND && !HIBERNATE && PM? >> > >> >> [snip] >> >> I just wanted to update suspend and resume callback to use >> SET_SYSTEM_SLEEP_PM_OPS >> as they are define under CONFIG_PM_SLEEP so I update above to avoid >> compilation warning/error. > Apologize: for not understanding your question. > First of all you did not answer to my question, so let me rephrase into > two: > 1. Is the code equivalent? No CONFIG_PM and CONFIG_PM_SLEEP are different options. But I could not disable CONFIG_PM_SLEEP option with either in exynos_defconfig CONFIG_PM_SLEEP=n or # CONFIG_PM_SLEEP is not set > 2. What will be the output with !SUSPEND && !HIBERNATE && PM? # # Power management options # # CONFIG_SUSPEND is not set # CONFIG_HIBERNATION is not set # CONFIG_PM is not set When CONFIG_SUSPEND and CONFIG_HIBERNATION are not set CONFIG_PM is disabled and so is CONFIG_PM_SLEEP. Best Regards -Anand Moon > > You didn't mention compilation warning/error in message commit so I do > not know what you are thinking about... > > Best regards, > Krzysztof