All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ofir Drang <ofir.drang@arm.com>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org,
	devel@driverdev.osuosl.org
Subject: [PATCH 03/10] staging: ccree: add explicit module init/exit func
Date: Thu, 14 Dec 2017 14:02:40 +0000	[thread overview]
Message-ID: <1513260170-26346-4-git-send-email-gilad@benyossef.com> (raw)
In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com>

We need to do a module global scope init/exit operation to support
the debugfs interface we are about to introduce in the next patch,
so wean the module of the boiler plate saving macro as it will no
longer be sufficient.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
 drivers/staging/ccree/ssi_driver.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c
index ad02d92..5427c7f 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -517,7 +517,18 @@ static struct platform_driver cc7x_driver = {
 	.probe = cc7x_probe,
 	.remove = cc7x_remove,
 };
-module_platform_driver(cc7x_driver);
+
+static int __init ccree_init(void)
+{
+	return platform_driver_register(&cc7x_driver);
+}
+module_init(ccree_init);
+
+static void __exit ccree_exit(void)
+{
+	platform_driver_unregister(&cc7x_driver);
+}
+module_exit(ccree_exit);
 
 /* Module description */
 MODULE_DESCRIPTION("ARM TrustZone CryptoCell REE Driver");
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-crypto@vger.kernel.org, devel@driverdev.osuosl.org,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, Ofir Drang <ofir.drang@arm.com>
Subject: [PATCH 03/10] staging: ccree: add explicit module init/exit func
Date: Thu, 14 Dec 2017 14:02:40 +0000	[thread overview]
Message-ID: <1513260170-26346-4-git-send-email-gilad@benyossef.com> (raw)
In-Reply-To: <1513260170-26346-1-git-send-email-gilad@benyossef.com>

We need to do a module global scope init/exit operation to support
the debugfs interface we are about to introduce in the next patch,
so wean the module of the boiler plate saving macro as it will no
longer be sufficient.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
 drivers/staging/ccree/ssi_driver.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c
index ad02d92..5427c7f 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -517,7 +517,18 @@ static struct platform_driver cc7x_driver = {
 	.probe = cc7x_probe,
 	.remove = cc7x_remove,
 };
-module_platform_driver(cc7x_driver);
+
+static int __init ccree_init(void)
+{
+	return platform_driver_register(&cc7x_driver);
+}
+module_init(ccree_init);
+
+static void __exit ccree_exit(void)
+{
+	platform_driver_unregister(&cc7x_driver);
+}
+module_exit(ccree_exit);
 
 /* Module description */
 MODULE_DESCRIPTION("ARM TrustZone CryptoCell REE Driver");
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2017-12-14 14:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 14:02 [PATCH 00/10] staging: ccree: cleanups & fixes Gilad Ben-Yossef
2017-12-14 14:02 ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 01/10] staging: ccree: drop ifdef CONFIG_OF in code Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 02/10] staging: ccree: clean up PM registration Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02 ` Gilad Ben-Yossef [this message]
2017-12-14 14:02   ` [PATCH 03/10] staging: ccree: add explicit module init/exit func Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 04/10] staging: ccree: staging: ccree: replace sysfs by debugfs interface Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:30   ` Philippe Ombredanne
2017-12-14 14:30     ` Philippe Ombredanne
2017-12-14 14:30     ` Philippe Ombredanne
2017-12-17  6:30     ` Gilad Ben-Yossef
2017-12-17  6:30       ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 05/10] staging: ccree: remove CC_IRQ_DELAY dead code Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 06/10] staging: ccree: remove useless debug code Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 07/10] staging: ccree: turn compile time debug log to params Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 08/10] staging: ccree: remove ssi_config.h Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 09/10] staging: ccree: fix fips event irq handling build Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef
2017-12-14 14:02 ` [PATCH 10/10] staging: ccree: update TODO Gilad Ben-Yossef
2017-12-14 14:02   ` Gilad Ben-Yossef

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=1513260170-26346-4-git-send-email-gilad@benyossef.com \
    --to=gilad@benyossef.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ofir.drang@arm.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.