summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2016-05-04 17:01:39 -0500
committerBjorn Andersson <bjorn.andersson@linaro.org>2016-05-06 11:09:01 -0700
commitb4f78259d593858feb85e02c195cf374f932feef (patch)
tree4141d6daac29a6a6c587b9591ee3d0521ceb87dc
parentf3d9f1ce079370d19b34fc9927b8b1355ac98503 (diff)
downloadlinux-rpi3-b4f78259d593858feb85e02c195cf374f932feef.tar.gz
linux-rpi3-b4f78259d593858feb85e02c195cf374f932feef.tar.bz2
linux-rpi3-b4f78259d593858feb85e02c195cf374f932feef.zip
rpmsg: use module_rpmsg_driver in existing drivers and examples
Existing drivers and examples are updated to use the module_rpmsg_driver helper macro. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r--Documentation/rpmsg.txt13
-rw-r--r--samples/rpmsg/rpmsg_client_sample.c13
2 files changed, 2 insertions, 24 deletions
diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt
index 1d884269e40c..a95e36a43288 100644
--- a/Documentation/rpmsg.txt
+++ b/Documentation/rpmsg.txt
@@ -254,18 +254,7 @@ static struct rpmsg_driver rpmsg_sample_client = {
.callback = rpmsg_sample_cb,
.remove = rpmsg_sample_remove,
};
-
-static int __init init(void)
-{
- return register_rpmsg_driver(&rpmsg_sample_client);
-}
-module_init(init);
-
-static void __exit fini(void)
-{
- unregister_rpmsg_driver(&rpmsg_sample_client);
-}
-module_exit(fini);
+module_rpmsg_driver(rpmsg_sample_client);
Note: a similar sample which can be built and loaded can be found
in samples/rpmsg/.
diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c
index 82ed288dcf07..d0e249c90668 100644
--- a/samples/rpmsg/rpmsg_client_sample.c
+++ b/samples/rpmsg/rpmsg_client_sample.c
@@ -82,18 +82,7 @@ static struct rpmsg_driver rpmsg_sample_client = {
.callback = rpmsg_sample_cb,
.remove = rpmsg_sample_remove,
};
-
-static int __init rpmsg_client_sample_init(void)
-{
- return register_rpmsg_driver(&rpmsg_sample_client);
-}
-module_init(rpmsg_client_sample_init);
-
-static void __exit rpmsg_client_sample_fini(void)
-{
- unregister_rpmsg_driver(&rpmsg_sample_client);
-}
-module_exit(rpmsg_client_sample_fini);
+module_rpmsg_driver(rpmsg_sample_client);
MODULE_DESCRIPTION("Remote processor messaging sample client driver");
MODULE_LICENSE("GPL v2");