linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Pihet <jean.pihet@newoldbits.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-pm@lists.linux-foundation.org,
	Kevin Hilman <khilman@ti.com>,
	linux-omap@vger.kernel.org
Subject: Re: [linux-pm] [PATCH] PM: export suspend_set_ops, suspend_valid_only_mem
Date: Mon, 30 May 2011 09:43:37 +0200	[thread overview]
Message-ID: <BANLkTi=pQEp=_RpNyJ9o=mxjA+PMhgTKZQ@mail.gmail.com> (raw)
In-Reply-To: <201105281101.13691.rjw@sisk.pl>

Rafael,

On Sat, May 28, 2011 at 11:01 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Saturday, May 28, 2011, Kevin Hilman wrote:
>> Some platforms wish to implement their PM core suspend code as
>> modules.  To do so, these functions need to be exported to modules.
>
> Hmm.  What happens if the module is not loaded and the user attempts to
> suspend?
In that case suspend_ops is NULL and suspending has no effect
(pm_suspend returns -ENODEV).
Note that this also happens after the module unload.

Is that the expected behavior?

>
> Rafael

Regards,
Jean

>
>
>> Reported-by: Jean Pihet <j-pihet@ti.com>
>> Signed-off-by: Kevin Hilman <khilman@ti.com>
>> ---
>> Applies against v2.6.39
>>
>>  kernel/power/suspend.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
>> index 6275970..eca495d 100644
>> --- a/kernel/power/suspend.c
>> +++ b/kernel/power/suspend.c
>> @@ -44,6 +44,7 @@ void suspend_set_ops(const struct platform_suspend_ops *ops)
>>       suspend_ops = ops;
>>       mutex_unlock(&pm_mutex);
>>  }
>> +EXPORT_SYMBOL(suspend_set_ops);
>>
>>  bool valid_state(suspend_state_t state)
>>  {
>> @@ -65,6 +66,7 @@ int suspend_valid_only_mem(suspend_state_t state)
>>  {
>>       return state == PM_SUSPEND_MEM;
>>  }
>> +EXPORT_SYMBOL(suspend_valid_only_mem);
>>
>>  static int suspend_test(int level)
>>  {
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-05-30  7:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28  0:33 [PATCH] PM: export suspend_set_ops, suspend_valid_only_mem Kevin Hilman
2011-05-28  9:01 ` [linux-pm] " Rafael J. Wysocki
2011-05-30  7:43   ` Jean Pihet [this message]
2011-05-30 14:00     ` Rafael J. Wysocki
2011-06-12 14:20 ` Rafael J. Wysocki
2011-06-26 11:08   ` Pavel Machek
2011-06-26 12:22     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=pQEp=_RpNyJ9o=mxjA+PMhgTKZQ@mail.gmail.com' \
    --to=jean.pihet@newoldbits.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).