From patchwork Thu Oct 22 06:17:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claude yen X-Patchwork-Id: 286745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8FBDC388F7 for ; Thu, 22 Oct 2020 06:23:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A40A2245F for ; Thu, 22 Oct 2020 06:23:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="SDvkG+yE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503519AbgJVGX1 (ORCPT ); Thu, 22 Oct 2020 02:23:27 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:40389 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2503508AbgJVGX1 (ORCPT ); Thu, 22 Oct 2020 02:23:27 -0400 X-UUID: 14e3fc6cc1f14dea82c5c74ad970b620-20201022 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=/vJ1k/CvUjLCTTWs6xEGCY+dakvbAFTCMIhNiUr7NTo=; b=SDvkG+yEmdWAXQuTQPGcxBlenMnAEjrGKN2jpDwlfEFiqOn3UDEv1dE3iavCxUbJT8kpBEPH9JZdTZJwoHEMMX27dvV8lpyv3R/1PkwAedjDpGAICKwNLXWjG3ewdpv512JnJRG4CC212O5rBeVoh7lJe8AVP7mguiLVhJ24cxA=; X-UUID: 14e3fc6cc1f14dea82c5c74ad970b620-20201022 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 980784132; Thu, 22 Oct 2020 14:18:14 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 22 Oct 2020 14:18:13 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 22 Oct 2020 14:18:13 +0800 From: Claude Yen To: "Rafael J . Wysocki" , Len Brown , Pavel Machek , Matthias Brugger CC: , , , , , Subject: [PATCH] PM / s2idle: Export s2idle_set_ops Date: Thu, 22 Oct 2020 14:17:48 +0800 Message-ID: <20201022061748.13730-2-claude.yen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201022061748.13730-1-claude.yen@mediatek.com> References: <20201022061748.13730-1-claude.yen@mediatek.com> MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org As suspend_set_ops is exported in commit a5e4fd8783a2 ("PM / Suspend: Export suspend_set_ops, suspend_valid_only_mem"), exporting s2idle_set_ops to make kernel module setup s2idle ops too. In this way, kernel module can hook platform suspend functions regardless of Suspend-to-Ram(S2R) or Suspend-to-Idle(S2I) Signed-off-by: Claude Yen --- kernel/power/suspend.c | 1 + 1 file changed, 1 insertion(+) -- 2.18.0 diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 8b1bb5ee7e5d..0dc3e8344318 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -79,6 +79,7 @@ void s2idle_set_ops(const struct platform_s2idle_ops *ops) s2idle_ops = ops; unlock_system_sleep(); } +EXPORT_SYMBOL_GPL(s2idle_set_ops); static void s2idle_begin(void) {