[PATCH 1/2][RFC] ACPI / PM: Reuse the acpi_sleep_syscore_ops for future requirement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: linux-pm@xxxxxxxxxxxxxxx
Cc: linux-acpi@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux