linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: peter.griffin@linaro.org (Peter Griffin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 9/9] phy: phy-spear1340-miphy: Use module_platform_driver to register driver.
Date: Fri, 15 Aug 2014 13:40:16 +0100	[thread overview]
Message-ID: <1408106416-19044-10-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org>

Using the module_platform_driver macro to register the driver as this gets
rid of a lot of the boilerplate code.

Also remove .owner field as this gets overridden in __platform_driver_register.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 drivers/phy/phy-spear1340-miphy.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c
index ee4d66f..1ecd094 100644
--- a/drivers/phy/phy-spear1340-miphy.c
+++ b/drivers/phy/phy-spear1340-miphy.c
@@ -282,23 +282,12 @@ static struct platform_driver spear1340_miphy_driver = {
 	.probe		= spear1340_miphy_probe,
 	.driver = {
 		.name = "spear1340-miphy",
-		.owner = THIS_MODULE,
 		.pm = &spear1340_miphy_pm_ops,
 		.of_match_table = of_match_ptr(spear1340_miphy_of_match),
 	},
 };
 
-static int __init spear1340_miphy_phy_init(void)
-{
-	return platform_driver_register(&spear1340_miphy_driver);
-}
-module_init(spear1340_miphy_phy_init);
-
-static void __exit spear1340_miphy_phy_exit(void)
-{
-	platform_driver_unregister(&spear1340_miphy_driver);
-}
-module_exit(spear1340_miphy_phy_exit);
+module_platform_driver(spear1340_miphy_driver);
 
 MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver");
 MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");
-- 
1.9.1

  parent reply	other threads:[~2014-08-15 12:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 12:40 [PATCH 0/9] phy: various misc cleanups to phy drivers Peter Griffin
2014-08-15 12:40 ` [PATCH 1/9] phy: phy-omap-control: Remove unncessary site specific OOM messages Peter Griffin
2014-08-15 12:40 ` [PATCH 2/9] phy: phy-mvebu-sata: Add missing error check for devm_kzalloc Peter Griffin
2014-08-15 13:10   ` Andrew Lunn
2014-08-15 12:40 ` [PATCH 3/9] phy: phy-omap-usb2: Remove unncessary site specific OOM messages Peter Griffin
2014-08-15 12:40 ` [PATCH 4/9] phy: phy-ti-pipe3: " Peter Griffin
2014-08-15 12:40 ` [PATCH 5/9] phy: phy-spear1310-miphy: " Peter Griffin
2014-08-15 12:40 ` [PATCH 6/9] phy: phy-spear1340-miphy: " Peter Griffin
2014-08-15 12:40 ` [PATCH 7/9] phy: remove .owner field for drivers using module_platform_driver Peter Griffin
2014-09-17 16:19   ` Kishon Vijay Abraham I
2014-09-17 19:04     ` Peter Griffin
2014-09-18  5:32       ` Kishon Vijay Abraham I
2014-08-15 12:40 ` [PATCH 8/9] phy: phy-spear1310-miphy: Use module_platform_driver to register driver Peter Griffin
2014-08-15 12:40 ` Peter Griffin [this message]
2014-08-20 15:03 ` [PATCH 0/9] phy: various misc cleanups to phy drivers Kishon Vijay Abraham I

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=1408106416-19044-10-git-send-email-peter.griffin@linaro.org \
    --to=peter.griffin@linaro.org \
    --cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).