All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-pm@vger.kernel.org>
Cc: <sre@kernel.org>, <yangyingliang@huawei.com>
Subject: [PATCH -next 5/5] power: reset: syscon-poweroff: use builtin_platform_driver() to simplify code
Date: Mon, 7 Aug 2023 21:19:51 +0800	[thread overview]
Message-ID: <20230807131951.3443880-6-yangyingliang@huawei.com> (raw)
In-Reply-To: <20230807131951.3443880-1-yangyingliang@huawei.com>

The syscon_poweroff_register() doesn't do anything special, so it can use the
builtin_platform_driver() macro to eliminate boilerplate code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/power/reset/syscon-poweroff.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/power/reset/syscon-poweroff.c b/drivers/power/reset/syscon-poweroff.c
index 430d440d55c6..270f289239a5 100644
--- a/drivers/power/reset/syscon-poweroff.c
+++ b/drivers/power/reset/syscon-poweroff.c
@@ -93,9 +93,4 @@ static struct platform_driver syscon_poweroff_driver = {
 		.of_match_table = syscon_poweroff_of_match,
 	},
 };
-
-static int __init syscon_poweroff_register(void)
-{
-	return platform_driver_register(&syscon_poweroff_driver);
-}
-device_initcall(syscon_poweroff_register);
+builtin_platform_driver(syscon_poweroff_driver);
-- 
2.25.1


  parent reply	other threads:[~2023-08-07 13:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 13:19 [PATCH -next 0/5] power: reset: use builtin_platform_driver() to simplify code Yang Yingliang
2023-08-07 13:19 ` [PATCH -next 1/5] power: reset: st-poweroff: " Yang Yingliang
2023-08-07 13:19 ` [PATCH -next 2/5] power: reset: msm: " Yang Yingliang
2023-08-07 13:19 ` [PATCH -next 3/5] power: reset: xgene-reboot: " Yang Yingliang
2023-08-07 13:19 ` [PATCH -next 4/5] power: reset: axxia-reset: " Yang Yingliang
2023-08-07 13:19 ` Yang Yingliang [this message]
2023-09-12 18:44 ` [PATCH -next 0/5] power: reset: " Sebastian Reichel

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=20230807131951.3443880-6-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.