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 3/5] power: reset: xgene-reboot: use builtin_platform_driver() to simplify code
Date: Mon, 7 Aug 2023 21:19:49 +0800	[thread overview]
Message-ID: <20230807131951.3443880-4-yangyingliang@huawei.com> (raw)
In-Reply-To: <20230807131951.3443880-1-yangyingliang@huawei.com>

The xgene_reboot_init() 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/xgene-reboot.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/power/reset/xgene-reboot.c b/drivers/power/reset/xgene-reboot.c
index 3260bd93158e..c2e5a99940d3 100644
--- a/drivers/power/reset/xgene-reboot.c
+++ b/drivers/power/reset/xgene-reboot.c
@@ -87,9 +87,4 @@ static struct platform_driver xgene_reboot_driver = {
 		.of_match_table = xgene_reboot_of_match,
 	},
 };
-
-static int __init xgene_reboot_init(void)
-{
-	return platform_driver_register(&xgene_reboot_driver);
-}
-device_initcall(xgene_reboot_init);
+builtin_platform_driver(xgene_reboot_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 ` Yang Yingliang [this message]
2023-08-07 13:19 ` [PATCH -next 4/5] power: reset: axxia-reset: " Yang Yingliang
2023-08-07 13:19 ` [PATCH -next 5/5] power: reset: syscon-poweroff: " Yang Yingliang
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-4-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.