All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Dan Williams <dan.j.williams@intel.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Linux NV-DIMM Mailing List <linux-nvdimm@lists.01.org>
Subject: [PATCH 2/3] libnvdimm, pmem: use module_nd_driver
Date: Wed, 14 Mar 2018 19:25:07 +0100	[thread overview]
Message-ID: <20180314182508.10351-3-jthumshirn@suse.de> (raw)
In-Reply-To: <20180314182508.10351-1-jthumshirn@suse.de>

Use module_nd_driver() instead of having module_init() and
module_exit() callbacks which just call nd_driver_register() and
nd_driver_unregister().

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/nvdimm/pmem.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 06f8dcc52ca6..d8ab882be790 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -547,17 +547,7 @@ static struct nd_device_driver nd_pmem_driver = {
 	.type = ND_DRIVER_NAMESPACE_IO | ND_DRIVER_NAMESPACE_PMEM,
 };
 
-static int __init pmem_init(void)
-{
-	return nd_driver_register(&nd_pmem_driver);
-}
-module_init(pmem_init);
-
-static void pmem_exit(void)
-{
-	driver_unregister(&nd_pmem_driver.drv);
-}
-module_exit(pmem_exit);
+module_nd_driver(nd_pmem_driver);
 
 MODULE_AUTHOR("Ross Zwisler <ross.zwisler@linux.intel.com>");
 MODULE_LICENSE("GPL v2");
-- 
2.13.6

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Dan Williams <dan.j.williams@intel.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Linux NV-DIMM Mailing List <linux-nvdimm@lists.01.org>,
	Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH 2/3] libnvdimm, pmem: use module_nd_driver
Date: Wed, 14 Mar 2018 19:25:07 +0100	[thread overview]
Message-ID: <20180314182508.10351-3-jthumshirn@suse.de> (raw)
In-Reply-To: <20180314182508.10351-1-jthumshirn@suse.de>

Use module_nd_driver() instead of having module_init() and
module_exit() callbacks which just call nd_driver_register() and
nd_driver_unregister().

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/nvdimm/pmem.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 06f8dcc52ca6..d8ab882be790 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -547,17 +547,7 @@ static struct nd_device_driver nd_pmem_driver = {
 	.type = ND_DRIVER_NAMESPACE_IO | ND_DRIVER_NAMESPACE_PMEM,
 };
 
-static int __init pmem_init(void)
-{
-	return nd_driver_register(&nd_pmem_driver);
-}
-module_init(pmem_init);
-
-static void pmem_exit(void)
-{
-	driver_unregister(&nd_pmem_driver.drv);
-}
-module_exit(pmem_exit);
+module_nd_driver(nd_pmem_driver);
 
 MODULE_AUTHOR("Ross Zwisler <ross.zwisler@linux.intel.com>");
 MODULE_LICENSE("GPL v2");
-- 
2.13.6

  parent reply	other threads:[~2018-03-14 18:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 18:25 [PATCH 0/3] Introduce module_nd_driver Johannes Thumshirn
2018-03-14 18:25 ` Johannes Thumshirn
2018-03-14 18:25 ` [PATCH 1/3] libnvdimm: provide module_nd_driver wrapper Johannes Thumshirn
2018-03-14 18:25   ` Johannes Thumshirn
2018-03-14 18:25 ` Johannes Thumshirn [this message]
2018-03-14 18:25   ` [PATCH 2/3] libnvdimm, pmem: use module_nd_driver Johannes Thumshirn
2018-03-14 18:25 ` [PATCH 3/3] device-dax: " Johannes Thumshirn
2018-03-14 18:25   ` Johannes Thumshirn
2018-03-15  7:22 ` [PATCH 0/3] Introduce module_nd_driver Christoph Hellwig
2018-03-15  7:22   ` Christoph Hellwig
2018-03-15  8:11   ` Johannes Thumshirn
2018-03-15  8:11     ` Johannes Thumshirn
2018-03-15 14:24     ` Dan Williams
2018-03-15 14:24       ` Dan Williams

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=20180314182508.10351-3-jthumshirn@suse.de \
    --to=jthumshirn@suse.de \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=ross.zwisler@linux.intel.com \
    /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.