lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220104062213.2365356-4-gwendal@chromium.org>
Date:   Mon,  3 Jan 2022 22:22:13 -0800
From:   Gwendal Grignou <gwendal@...omium.org>
To:     bleung@...omium.org, groeck@...omium.org
Cc:     linux-kernel@...r.kernel.org,
        Gwendal Grignou <gwendal@...omium.org>
Subject: [PATCH 3/3] plaform/chrome: Remove SET_LATE_SYSTEM_SLEEP_PM_OPS

commit 296282fca791 ("PM: core: Add new *_PM_OPS macros, deprecate old ones")
introduces LATE_SYSTEM_SLEEP_PM_OPS, so we can remove the #ifdef around
suspend/resume functions.

Signed-off-by: Gwendal Grignou <gwendal@...omium.org>
---
 drivers/platform/chrome/cros_ec_i2c.c | 6 ++----
 drivers/platform/chrome/cros_ec_lpc.c | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_i2c.c b/drivers/platform/chrome/cros_ec_i2c.c
index 30c8938c27d54e..b27c15f6774cc9 100644
--- a/drivers/platform/chrome/cros_ec_i2c.c
+++ b/drivers/platform/chrome/cros_ec_i2c.c
@@ -316,7 +316,6 @@ static int cros_ec_i2c_remove(struct i2c_client *client)
 	return cros_ec_unregister(ec_dev);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int cros_ec_i2c_suspend(struct device *dev)
 {
 	struct cros_ec_device *ec_dev = to_ec_dev(dev);
@@ -330,10 +329,9 @@ static int cros_ec_i2c_resume(struct device *dev)
 
 	return cros_ec_resume(ec_dev);
 }
-#endif
 
 static const struct dev_pm_ops cros_ec_i2c_pm_ops = {
-	SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_i2c_suspend, cros_ec_i2c_resume)
+	LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_i2c_suspend, cros_ec_i2c_resume)
 };
 
 #ifdef CONFIG_OF
@@ -363,7 +361,7 @@ static struct i2c_driver cros_ec_driver = {
 		.name	= "cros-ec-i2c",
 		.acpi_match_table = ACPI_PTR(cros_ec_i2c_acpi_id),
 		.of_match_table = of_match_ptr(cros_ec_i2c_of_match),
-		.pm	= &cros_ec_i2c_pm_ops,
+		.pm	= pm_sleep_ptr(&cros_ec_i2c_pm_ops),
 	},
 	.probe		= cros_ec_i2c_probe,
 	.remove		= cros_ec_i2c_remove,
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index d6306d2a096f13..91b4f9dad069b1 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -504,7 +504,6 @@ static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = {
 };
 MODULE_DEVICE_TABLE(dmi, cros_ec_lpc_dmi_table);
 
-#ifdef CONFIG_PM_SLEEP
 static int cros_ec_lpc_suspend(struct device *dev)
 {
 	struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
@@ -518,17 +517,16 @@ static int cros_ec_lpc_resume(struct device *dev)
 
 	return cros_ec_resume(ec_dev);
 }
-#endif
 
 static const struct dev_pm_ops cros_ec_lpc_pm_ops = {
-	SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
+	LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
 };
 
 static struct platform_driver cros_ec_lpc_driver = {
 	.driver = {
 		.name = DRV_NAME,
 		.acpi_match_table = cros_ec_lpc_acpi_device_ids,
-		.pm = &cros_ec_lpc_pm_ops,
+		.pm = pm_sleep_ptr(&cros_ec_lpc_pm_ops),
 	},
 	.probe = cros_ec_lpc_probe,
 	.remove = cros_ec_lpc_remove,
-- 
2.34.1.448.ga2b2bfdf31-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ