]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: tag core init and exit functions
authorAlex Elder <elder@linaro.org>
Tue, 9 Jun 2015 22:42:50 +0000 (17:42 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 10 Jun 2015 17:38:23 +0000 (10:38 -0700)
The top-level functions gb_init() and gb_exit() are tagged with
__init and __exit, respectively.  These functions call a few
other functions that are similarly used only at initialization
and termination time.  So mark those functions accordingly.

Note that, because gb_ap_exit() and gb_debugfs_cleanup()
are called by gb_init() in error paths, these functions
cannot be declared with the __exit attribute.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/ap.c
drivers/staging/greybus/debugfs.c
drivers/staging/greybus/greybus.h
drivers/staging/greybus/operation.c
drivers/staging/greybus/operation.h

index 843ddc24f41cd9bc514adb6c36a8e2b336c6d00a..07375cc96bfbb2887c42ed248bf9fb92d87e2747 100644 (file)
@@ -354,7 +354,7 @@ int greybus_svc_in(struct greybus_host_device *hd, u8 *data, int size)
 }
 EXPORT_SYMBOL_GPL(greybus_svc_in);
 
-int gb_ap_init(void)
+int __init gb_ap_init(void)
 {
        ap_workqueue = alloc_ordered_workqueue("greybus_ap", 0);
        if (!ap_workqueue)
index 59c570964b0161fe577ab16bc82a8571df0a0e2f..725565de5d4375e49280ffab015939916d036ce9 100644 (file)
@@ -15,7 +15,7 @@
 
 static struct dentry *gb_debug_root;
 
-void gb_debugfs_init(void)
+void __init gb_debugfs_init(void)
 {
        gb_debug_root = debugfs_create_dir("greybus", NULL);
 }
index 05eab4c5f9a0ddc8c448608aaf7415c3b1f958d7..cf7c4419aad78a00ddc90840a04862f4bbc6536e 100644 (file)
@@ -154,9 +154,9 @@ void greybus_deregister_driver(struct greybus_driver *driver);
 int greybus_disabled(void);
 
 int greybus_svc_in(struct greybus_host_device *hd, u8 *data, int length);
-int gb_ap_init(void);
+int gb_ap_init(void) __init;
 void gb_ap_exit(void);
-void gb_debugfs_init(void);
+void gb_debugfs_init(void) __init;
 void gb_debugfs_cleanup(void);
 struct dentry *gb_debugfs_get(void);
 
index 88b9f6a40c79f516db260661fe2a4e9f5bfc542a..49bc628e621b069407e5de3e8f0e048b273c41ec 100644 (file)
@@ -932,7 +932,7 @@ int gb_operation_sync(struct gb_connection *connection, int type,
 }
 EXPORT_SYMBOL_GPL(gb_operation_sync);
 
-int gb_operation_init(void)
+int __init gb_operation_init(void)
 {
        gb_message_cache = kmem_cache_create("gb_message_cache",
                                sizeof(struct gb_message), 0, 0, NULL);
@@ -959,7 +959,7 @@ err_destroy_message_cache:
        return -ENOMEM;
 }
 
-void gb_operation_exit(void)
+void __exit gb_operation_exit(void)
 {
        destroy_workqueue(gb_operation_workqueue);
        gb_operation_workqueue = NULL;
index 0199976c9b5fd1388fe88a98ba1e58d4172b1dee..fcd6566f4bc8891aaac2fce0c2e1d0d7af79fdd8 100644 (file)
@@ -158,7 +158,7 @@ int gb_operation_sync(struct gb_connection *connection, int type,
                      void *request, int request_size,
                      void *response, int response_size);
 
-int gb_operation_init(void);
-void gb_operation_exit(void);
+int gb_operation_init(void) __init;
+void gb_operation_exit(void) __exit;
 
 #endif /* !__OPERATION_H */