Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752298AbcJIVRS (ORCPT ); Sun, 9 Oct 2016 17:17:18 -0400 Received: from netrider.rowland.org ([192.131.102.5]:50959 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751027AbcJIVRR (ORCPT ); Sun, 9 Oct 2016 17:17:17 -0400 Date: Sun, 9 Oct 2016 17:17:15 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Krzysztof Kozlowski cc: Anand Moon , Greg Kroah-Hartman , Kukjin Kim , Javier Martinez Canillas , , , , Subject: Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS In-Reply-To: <20161009163446.GA9672@kozik-lap> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1320 Lines: 33 On Sun, 9 Oct 2016, 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? It's hard to say what Anand originally had in mind. To me, it looks like it will behave exactly the same as before, the only difference being that the object image will not contain unused exynos_ehci_suspend and exynos_ehci_resume routines. And the compiler won't issue a warning at build time that the routines are unused. Alan Stern