mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH v2 2/6] Add more drivers to using device_platform_driver()
Date: Sun, 10 Mar 2013 10:41:31 +0400	[thread overview]
Message-ID: <1362897695-3936-2-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1362897695-3936-1-git-send-email-shc_work@mail.ru>


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/net/xgmac.c   | 8 +-------
 drivers/spi/mxs_spi.c | 8 +-------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/net/xgmac.c b/drivers/net/xgmac.c
index 203e682..b4bfd08 100644
--- a/drivers/net/xgmac.c
+++ b/drivers/net/xgmac.c
@@ -731,10 +731,4 @@ static struct driver_d hb_xgmac_driver = {
 	.probe = hb_xgmac_probe,
 	.of_compatible = DRV_OF_COMPAT(xgmac_dt_ids),
 };
-
-static int hb_xgmac_driver_init(void)
-{
-	debug("%s\n", __func__);
-	return platform_driver_register(&hb_xgmac_driver);
-}
-device_initcall(hb_xgmac_driver_init);
+device_platform_driver(hb_xgmac_driver);
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 89b4d19..e15f2c2 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -276,13 +276,7 @@ static struct driver_d mxs_spi_driver = {
 	.name  = "mxs_spi",
 	.probe = mxs_spi_probe,
 };
-
-static int __init mxs_spi_init(void)
-{
-	return platform_driver_register(&mxs_spi_driver);
-}
-
-device_initcall(mxs_spi_init);
+device_platform_driver(mxs_spi_driver);
 
 MODULE_AUTHOR("Denx Software Engeneering and Michael Grzeschik");
 MODULE_DESCRIPTION("MXS SPI driver");
-- 
1.7.12.4


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

  reply	other threads:[~2013-03-10  6:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10  6:41 [PATCH v2 1/6] Extend device_platform_driver macro Alexander Shiyan
2013-03-10  6:41 ` Alexander Shiyan [this message]
2013-03-10  6:41 ` [PATCH v2 3/6] Introduce console_platform_driver() macro and use it for serial drivers Alexander Shiyan
2013-03-10  6:41 ` [PATCH v2 4/6] SPI: Rename spi_register_driver() for using with register_driver_macro() Alexander Shiyan
2013-03-10  6:41 ` [PATCH v2 5/6] I2C: Rename i2c_register_driver() " Alexander Shiyan
2013-03-10  6:41 ` [PATCH v2 6/6] Introduce device_spi_driver() macro and use it for SPI drivers Alexander Shiyan

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=1362897695-3936-2-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --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