From: Dragan Simic <dsimic@manjaro.org>
To: lee@kernel.org, wens@csie.org
Cc: linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev
Subject: [PATCH 2/2] mfd: stpmic1: Use devm_register_power_off_handler()
Date: Tue, 12 Nov 2024 13:46:48 +0100 [thread overview]
Message-ID: <219e0de8bcd1b2ef24142c837d8331ffc535ab26.1731415409.git.dsimic@manjaro.org> (raw)
In-Reply-To: <cover.1731415409.git.dsimic@manjaro.org>
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@manjaro.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;
next prev parent reply other threads:[~2024-11-12 12:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 12:46 [PATCH 0/2] Use devm_register_power_off_handler() where appropriate Dragan Simic
2024-11-12 12:46 ` [PATCH 1/2] mfd: axp20x: Use devm_register_power_off_handler() Dragan Simic
2024-11-12 12:46 ` Dragan Simic [this message]
2024-12-11 12:06 ` [PATCH 0/2] Use devm_register_power_off_handler() where appropriate Lee Jones
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=219e0de8bcd1b2ef24142c837d8331ffc535ab26.1731415409.git.dsimic@manjaro.org \
--to=dsimic@manjaro.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=wens@csie.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®