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] [thread-next>] [day] [month] [year] [list]
Message-Id: <219e0de8bcd1b2ef24142c837d8331ffc535ab26.1731415409.git.dsimic@manjaro.org>
Date: Tue, 12 Nov 2024 13:46:48 +0100
From: Dragan Simic <dsimic@...jaro.org>
To: lee@...nel.org,
	wens@...e.org
Cc: linux-kernel@...r.kernel.org,
	linux-sunxi@...ts.linux.dev
Subject: [PATCH 2/2] mfd: stpmic1: Use devm_register_power_off_handler()

Simplify the code a bit by using devm_register_power_off_handler(), which is
a purpose-specific wrapper for devm_register_sys_off_handler().  No intended
functional changes are introduced.

Signed-off-by: Dragan Simic <dsimic@...jaro.org>
---
 drivers/mfd/stpmic1.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/mfd/stpmic1.c b/drivers/mfd/stpmic1.c
index d8a603d95aa6..081827bc0596 100644
--- a/drivers/mfd/stpmic1.c
+++ b/drivers/mfd/stpmic1.c
@@ -170,11 +170,7 @@ static int stpmic1_probe(struct i2c_client *i2c)
 		return ret;
 	}
 
-	ret = devm_register_sys_off_handler(ddata->dev,
-					    SYS_OFF_MODE_POWER_OFF,
-					    SYS_OFF_PRIO_DEFAULT,
-					    stpmic1_power_off,
-					    ddata);
+	ret = devm_register_power_off_handler(ddata->dev, stpmic1_power_off, ddata);
 	if (ret) {
 		dev_err(ddata->dev, "failed to register sys-off handler: %d\n", ret);
 		return ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ