From patchwork Thu May 26 23:09:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 822232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4QN9rDb030087 for ; Thu, 26 May 2011 23:09:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933028Ab1EZXJv (ORCPT ); Thu, 26 May 2011 19:09:51 -0400 Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]:44127 "EHLO na3sys009aog107.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932515Ab1EZXJu (ORCPT ); Thu, 26 May 2011 19:09:50 -0400 Received: from mail-pv0-f181.google.com ([74.125.83.181]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKTd7dvnp7UCk7GyuHEN6eDgrxHkuEuk20@postini.com; Thu, 26 May 2011 16:09:50 PDT Received: by mail-pv0-f181.google.com with SMTP id 13so613399pvg.40 for ; Thu, 26 May 2011 16:09:49 -0700 (PDT) Received: by 10.68.35.198 with SMTP id k6mr592866pbj.460.1306451389863; Thu, 26 May 2011 16:09:49 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id o2sm1822695pbi.14.2011.05.26.16.09.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 16:09:49 -0700 (PDT) From: Kevin Hilman To: jean.pihet@newoldbits.com Cc: linux-omap@vger.kernel.org Subject: Re: [PATCH 09/13] OMAP2+: PM: export suspend_set_ops to PM modules Organization: Texas Instruments, Inc. References: <1305739950-11695-1-git-send-email-j-pihet@ti.com> <1305739950-11695-10-git-send-email-j-pihet@ti.com> Date: Thu, 26 May 2011 16:09:47 -0700 In-Reply-To: <1305739950-11695-10-git-send-email-j-pihet@ti.com> (jean pihet's message of "Wed, 18 May 2011 19:32:26 +0200") Message-ID: <87lixt9hz8.fsf@ti.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 26 May 2011 23:09:53 +0000 (UTC) jean.pihet@newoldbits.com writes: > From: Jean Pihet > > 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 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 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 Signed-off-by: Kevin Hilman Acked-by: Jean Pihet --- 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) {