diff mbox

[09/13] OMAP2+: PM: export suspend_set_ops to PM modules

Message ID 87lixt9hz8.fsf@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kevin Hilman May 26, 2011, 11:09 p.m. UTC
jean.pihet@newoldbits.com writes:

> From: Jean Pihet <j-pihet@ti.com>
>
> Export the suspend_set_ops API as omap_pm_suspend_set_ops in the pm
> generic code, under CONFIG_SUSPEND.
>
> Note -hack warning-: since the 'suspend_valid_only_mem' function is
> not exported to modules, fill the 'valid' field value of
> 'struct platform_suspend_ops' in the common code.
>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>

Can you try the patch below instead?    If that works, I'll submit to
Rafael/linux-pm.

Kevin

From d3aca6317f5f92a5fd4fbaf1d039232c83cac4f4 Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@ti.com>
Date: Thu, 26 May 2011 16:10:13 -0700
Subject: [PATCH] PM: export suspend_set_ops, suspend_valid_only_mem

Some platforms wish to implement their PM core code as modules.  To
do so, these functions need to be exported for modules.

Reported-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 kernel/power/suspend.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Jean Pihet May 27, 2011, 7:48 a.m. UTC | #1
On Fri, May 27, 2011 at 1:09 AM, Kevin Hilman <khilman@ti.com> wrote:
> jean.pihet@newoldbits.com writes:
>
>> From: Jean Pihet <j-pihet@ti.com>
>>
>> Export the suspend_set_ops API as omap_pm_suspend_set_ops in the pm
>> generic code, under CONFIG_SUSPEND.
>>
>> Note -hack warning-: since the 'suspend_valid_only_mem' function is
>> not exported to modules, fill the 'valid' field value of
>> 'struct platform_suspend_ops' in the common code.
>>
>> Signed-off-by: Jean Pihet <j-pihet@ti.com>
>
> Can you try the patch below instead?    If that works, I'll submit to
> Rafael/linux-pm.
This is much cleaner! We need this pushed upstream.

Acked-by: Jean Pihet <j-pihet@ti.com>

Thanks,
Jean

>
> Kevin
>
> From d3aca6317f5f92a5fd4fbaf1d039232c83cac4f4 Mon Sep 17 00:00:00 2001
> From: Kevin Hilman <khilman@ti.com>
> Date: Thu, 26 May 2011 16:10:13 -0700
> Subject: [PATCH] PM: export suspend_set_ops, suspend_valid_only_mem
>
> Some platforms wish to implement their PM core code as modules.  To
> do so, these functions need to be exported for modules.
>
> Reported-by: Jean Pihet <j-pihet@ti.com>
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
>  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)
>  {
> --
> 1.7.4
>
>
--
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
diff mbox

Patch

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)
 {