mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/3] regulator: pfuze: Use device_i2c_driver() macro
Date: Tue, 29 Sep 2020 10:19:08 +0200	[thread overview]
Message-ID: <20200929081909.30235-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20200929081909.30235-1-s.hauer@pengutronix.de>

Shorten driver registration by using the suitable macro.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/regulator/pfuze.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/regulator/pfuze.c b/drivers/regulator/pfuze.c
index 91aaec0e7e..1983ec91f6 100644
--- a/drivers/regulator/pfuze.c
+++ b/drivers/regulator/pfuze.c
@@ -206,15 +206,4 @@ static struct driver_d pfuze_i2c_driver = {
 	.of_compatible	= DRV_OF_COMPAT(pfuze_dt_ids),
 };
 
-static int __init pfuze_init(void)
-{
-	int ret;
-
-	ret = i2c_driver_register(&pfuze_i2c_driver);
-	if (ret)
-		return ret;
-
-	return 0;
-
-}
-late_initcall(pfuze_init);
+device_i2c_driver(pfuze_i2c_driver);
-- 
2.28.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-09-29  8:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  8:19 [PATCH 1/3] treewide: Use driver macro Sascha Hauer
2020-09-29  8:19 ` Sascha Hauer [this message]
2020-09-29  8:19 ` [PATCH 3/3] net: phy: Add and use driver register macro Sascha Hauer
2020-09-29 12:10   ` Ahmad Fatoum
2020-10-01  6:31     ` Sascha Hauer

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=20200929081909.30235-2-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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