Commit 0d34be75 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: Greybus: Place module_init/exit() right after respective routines

As mentioned in kernel coding guidelines.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 13fe6a9a
......@@ -72,6 +72,7 @@ static int __init gpbridge_init(void)
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");
......@@ -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");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment