OSDN Git Service

greybus: raw: move module_{init|exit} to the end of functions
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 20 May 2015 11:24:22 +0000 (16:54 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 21 May 2015 05:43:05 +0000 (22:43 -0700)
This is what coding guidelines say. Lets do it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/raw.c

index 515c187..d93d052 100644 (file)
@@ -357,6 +357,7 @@ error_chrdev:
 error_class:
        return retval;
 }
+module_init(raw_init);
 
 static void __exit raw_exit(void)
 {
@@ -364,8 +365,6 @@ static void __exit raw_exit(void)
        unregister_chrdev_region(MKDEV(raw_major, 0), NUM_MINORS);
        class_destroy(raw_class);
 }
-
-module_init(raw_init);
 module_exit(raw_exit);
 
 MODULE_LICENSE("GPL v2");