Re: [PATCH 3/6] driver: serial: omap: add prepare/complete callbackfor "no_console_suspend" case

From: Felipe Balbi
Date: Thu Apr 18 2013 - 09:06:47 EST


Hi,

On Thu, Apr 18, 2013 at 05:37:48PM +0530, Sourav Poddar wrote:
> Hi Felipe,
> On Thursday 18 April 2013 09:28 AM, Felipe Balbi wrote:
> >Hi,
> >
> >On Wed, Apr 17, 2013 at 05:04:24PM +0530, Sourav Poddar wrote:
> >>@@ -1632,6 +1650,8 @@ static const struct dev_pm_ops serial_omap_dev_pm_ops = {
> >> SET_SYSTEM_SLEEP_PM_OPS(serial_omap_suspend, serial_omap_resume)
> >> SET_RUNTIME_PM_OPS(serial_omap_runtime_suspend,
> >> serial_omap_runtime_resume, NULL)
> >>+ .prepare = serial_omap_prepare,
> >>+ .complete = serial_omap_complete,
> >if CONFIG_PM_SLEEP isn't defined, this will break compilation.
> >
> True.
>
> Then, will it not be a better idea to add a similar macro[1] in
> include/linux/pm.h for
> prepare/complete callback as it is present for suspend/resume ?.
>
> [1]:
> #ifdef CONFIG_PM_SLEEP
> #define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
> .suspend = suspend_fn, \
> .resume = resume_fn, \
> .freeze = suspend_fn, \
> .thaw = resume_fn, \
> .poweroff = suspend_fn, \
> .restore = resume_fn,
> #else
> #define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
> #endif

might be :-)

--
balbi

Attachment: signature.asc
Description: Digital signature