[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150922211234.GD7094@saruman.tx.rr.com>
Date: Tue, 22 Sep 2015 16:12:34 -0500
From: Felipe Balbi <balbi@...com>
To: "Felipe F. Tonello" <eu@...ipetonello.com>
CC: <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Peter Chen <Peter.Chen@...escale.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Felipe Balbi <balbi@...com>,
Andrzej Pietrasiewicz <andrzej.p@...sung.com>
Subject: Re: [PATCH 1/3] usb: chipidea: core: fix when building without
CONFIG_PM support
Hi,
On Tue, Sep 22, 2015 at 07:59:08PM +0100, Felipe F. Tonello wrote:
> If CONFIG_PM or CONFIG_PM_SLEEP is not set, driver will not compile
> properly.
>
> Signed-off-by: Felipe F. Tonello <eu@...ipetonello.com>
> ---
> drivers/usb/chipidea/core.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 3ad48e1..4182549 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -1009,18 +1009,22 @@ static int ci_runtime_resume(struct device *dev)
> return ci_controller_resume(dev);
> }
>
> -#endif /* CONFIG_PM */
> static const struct dev_pm_ops ci_pm_ops = {
> +#ifdef CONFIG_PM_SLEEP
> SET_SYSTEM_SLEEP_PM_OPS(ci_suspend, ci_resume)
> +#endif /* CONFIG_PM_SLEEP */
NAK, this is not the right way to do it. Look at the definition of
SET_SYSTEM_SLEEP_PM_OPS() and other users in the kernel.
> SET_RUNTIME_PM_OPS(ci_runtime_suspend, ci_runtime_resume, NULL)
> };
> +#endif /* CONFIG_PM */
>
> static struct platform_driver ci_hdrc_driver = {
> .probe = ci_hdrc_probe,
> .remove = ci_hdrc_remove,
> .driver = {
> .name = "ci_hdrc",
> +#ifdef CONFIG_PM
> .pm = &ci_pm_ops,
> +#endif
> },
> };
>
> --
> 2.1.4
>
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists