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 1/2] mfd: axp20x: Use devm_register_power_off_handler()
Date: Tue, 12 Nov 2024 13:46:47 +0100 [thread overview]
Message-ID: <ab1f059f4b5bef75da3d3903d0fbf28bddffd57c.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/axp20x.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index 4051551757f2..2005d4291332 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -1429,10 +1429,7 @@ int axp20x_device_probe(struct axp20x_dev *axp20x)
}
if (axp20x->variant != AXP288_ID)
- devm_register_sys_off_handler(axp20x->dev,
- SYS_OFF_MODE_POWER_OFF,
- SYS_OFF_PRIO_DEFAULT,
- axp20x_power_off, axp20x);
+ devm_register_power_off_handler(axp20x->dev, axp20x_power_off, axp20x);
dev_info(axp20x->dev, "AXP20X driver loaded\n");
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 ` Dragan Simic [this message]
2024-11-12 12:46 ` [PATCH 2/2] mfd: stpmic1: Use devm_register_power_off_handler() Dragan Simic
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=ab1f059f4b5bef75da3d3903d0fbf28bddffd57c.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®