Skip to content

Commit

Permalink
rpmsg: use module_rpmsg_driver in existing drivers and examples
Browse files Browse the repository at this point in the history
Existing drivers and examples are updated to use the
module_rpmsg_driver helper macro.

Signed-off-by: Andrew F. Davis <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
  • Loading branch information
glneo authored and andersson committed May 6, 2016
1 parent f3d9f1c commit b4f7825
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
13 changes: 1 addition & 12 deletions Documentation/rpmsg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/.
Expand Down
13 changes: 1 addition & 12 deletions samples/rpmsg/rpmsg_client_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit b4f7825

Please sign in to comment.