]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: Greybus: Place module_init/exit() right after respective routines
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 24 Mar 2015 14:44:28 +0000 (20:14 +0530)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 24 Mar 2015 20:00:24 +0000 (21:00 +0100)
As mentioned in kernel coding guidelines.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/gpb.c
drivers/staging/greybus/vibrator.c

index 931d739f9fb91bdf73250893a0537d92ac51041e..33bbe7917f09542d55fdd562016557fab7b0cedf 100644 (file)
@@ -72,6 +72,7 @@ error_pwm:
 error_gpio:
        return -EPROTO;
 }
+module_init(gpbridge_init);
 
 static void __exit gpbridge_exit(void)
 {
@@ -84,8 +85,6 @@ static void __exit gpbridge_exit(void)
        gb_pwm_protocol_exit();
        gb_gpio_protocol_exit();
 }
-
-module_init(gpbridge_init);
 module_exit(gpbridge_exit);
 
 MODULE_LICENSE("GPL");
index c92c69ef302554254c7a5208062dea23587e66c3..2943a9b381c6b7515ac963b953cfab3c493752be 100644 (file)
@@ -185,14 +185,13 @@ static __init int protocol_init(void)
 
        return gb_protocol_register(&vibrator_protocol);
 }
+module_init(protocol_init);
 
 static __exit void protocol_exit(void)
 {
        gb_protocol_deregister(&vibrator_protocol);
        class_unregister(&vibrator_class);
 }
-
-module_init(protocol_init);
 module_exit(protocol_exit);
 
 MODULE_LICENSE("GPL v2");