From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: "Hauke Mehrtens" <hauke@hauke-m.de>, "Rafał Miłecki" <zajec5@gmail.com>
Subject: [RFC 1/3] Revert "mtd: bcm47xxnflash: Use module_platform_driver"
Date: Sun, 23 Feb 2014 12:26:57 +0100 [thread overview]
Message-ID: <1393154819-7369-2-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1393154819-7369-1-git-send-email-zajec5@gmail.com>
This reverts commit 994bbd0e91c0dfa4dcda9097b0716607aeec5470.
We're going to add support for more NAND flashes and the new ones are
not registered as platform devices. So we need our own init function.
---
drivers/mtd/nand/bcm47xxnflash/main.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c
index 1074459..52611ef 100644
--- a/drivers/mtd/nand/bcm47xxnflash/main.c
+++ b/drivers/mtd/nand/bcm47xxnflash/main.c
@@ -77,4 +77,22 @@ static struct platform_driver bcm47xxnflash_driver = {
},
};
-module_platform_driver(bcm47xxnflash_driver);
+static int __init bcm47xxnflash_init(void)
+{
+ int err;
+
+ err = platform_driver_register(&bcm47xxnflash_driver);
+ if (err)
+ pr_err("Failed to register bcm47xx nand flash driver: %d\n",
+ err);
+
+ return err;
+}
+
+static void __exit bcm47xxnflash_exit(void)
+{
+ platform_driver_unregister(&bcm47xxnflash_driver);
+}
+
+module_init(bcm47xxnflash_init);
+module_exit(bcm47xxnflash_exit);
--
1.8.4.5
next prev parent reply other threads:[~2014-02-23 11:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-23 11:26 [RFC 0/3] mtd: bcm47xxnflash: adding support for new NANDs Rafał Miłecki
2014-02-23 11:26 ` Rafał Miłecki [this message]
2014-02-23 11:26 ` [RFC 2/3] mtd: bcm47xxnflash: add separated config for platform driver Rafał Miłecki
2014-02-23 11:26 ` [RFC 3/3] mtd: bcm47xxnflash: prepare for adding BCMA driver Rafał Miłecki
2014-02-23 11:31 ` [RFC 0/3] mtd: bcm47xxnflash: adding support for new NANDs Hauke Mehrtens
2014-02-26 3:09 ` Brian Norris
-- strict thread matches above, loose matches on Subject: below --
2014-02-23 11:33 [RFC 1/3] Revert "mtd: bcm47xxnflash: Use module_platform_driver" Rafał Miłecki
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=1393154819-7369-2-git-send-email-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=hauke@hauke-m.de \
--cc=linux-mtd@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