Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrew F. Davis and committed by
Bjorn Andersson
b4f78259 f3d9f1ce

+2 -24
+1 -12
Documentation/rpmsg.txt
··· 254 254 .callback = rpmsg_sample_cb, 255 255 .remove = rpmsg_sample_remove, 256 256 }; 257 - 258 - static int __init init(void) 259 - { 260 - return register_rpmsg_driver(&rpmsg_sample_client); 261 - } 262 - module_init(init); 263 - 264 - static void __exit fini(void) 265 - { 266 - unregister_rpmsg_driver(&rpmsg_sample_client); 267 - } 268 - module_exit(fini); 257 + module_rpmsg_driver(rpmsg_sample_client); 269 258 270 259 Note: a similar sample which can be built and loaded can be found 271 260 in samples/rpmsg/.
+1 -12
samples/rpmsg/rpmsg_client_sample.c
··· 82 82 .callback = rpmsg_sample_cb, 83 83 .remove = rpmsg_sample_remove, 84 84 }; 85 - 86 - static int __init rpmsg_client_sample_init(void) 87 - { 88 - return register_rpmsg_driver(&rpmsg_sample_client); 89 - } 90 - module_init(rpmsg_client_sample_init); 91 - 92 - static void __exit rpmsg_client_sample_fini(void) 93 - { 94 - unregister_rpmsg_driver(&rpmsg_sample_client); 95 - } 96 - module_exit(rpmsg_client_sample_fini); 85 + module_rpmsg_driver(rpmsg_sample_client); 97 86 98 87 MODULE_DESCRIPTION("Remote processor messaging sample client driver"); 99 88 MODULE_LICENSE("GPL v2");