From: Chen Yu <yu.c.chen@intel.com>
To: linux-acpi@vger.kernel.org
Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Chen Yu <yu.c.chen@intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2][RFC] ACPI / PM: Reuse the acpi_sleep_syscore_ops for future requirement
Date: Sat, 26 Aug 2017 00:43:30 +0800 [thread overview]
Message-ID: <eac9a77583a7ee95321acffb495f8c8e292f4a09.1503678995.git.yu.c.chen@intel.com> (raw)
In-Reply-To: <cover.1503678995.git.yu.c.chen@intel.com>
There might be other actions to be taken during the
acpi syscore suspend/resume phase, thus reuse the
acpi_sleep_syscore_ops in case other operations are
added into the acpi_sleep_syscore_ops.
No functional change.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
drivers/acpi/sleep.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index fa8243c..cad1a0f 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -865,9 +865,19 @@ static void acpi_restore_bm_rld(void)
acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld);
}
+static int acpi_syscore_suspend(void)
+{
+ return acpi_save_bm_rld();
+}
+
+static void acpi_syscore_restore(void)
+{
+ acpi_restore_bm_rld();
+}
+
static struct syscore_ops acpi_sleep_syscore_ops = {
- .suspend = acpi_save_bm_rld,
- .resume = acpi_restore_bm_rld,
+ .suspend = acpi_syscore_suspend,
+ .resume = acpi_syscore_restore,
};
void acpi_sleep_syscore_init(void)
--
2.7.4
next parent reply other threads:[~2017-08-25 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1503678995.git.yu.c.chen@intel.com>
2017-08-25 16:43 ` Chen Yu [this message]
2017-08-25 16:43 ` [PATCH 2/2][RFC] ACPI / PM: Disable the MSR T-state during CPU online Chen Yu
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=eac9a77583a7ee95321acffb495f8c8e292f4a09.1503678995.git.yu.c.chen@intel.com \
--to=yu.c.chen@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®