提交 d5274369 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

s390/debug: remove module_exit function / move EXPORT_SYMBOLs

debug.c is not a module, so remove the module_exit function, since it
will never be called.
Also move the EXPORT_SYMBOL statements to the functions they belong to.
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 bdc0077a
...@@ -110,6 +110,7 @@ struct debug_view debug_raw_view = { ...@@ -110,6 +110,7 @@ struct debug_view debug_raw_view = {
NULL, NULL,
NULL NULL
}; };
EXPORT_SYMBOL(debug_raw_view);
struct debug_view debug_hex_ascii_view = { struct debug_view debug_hex_ascii_view = {
"hex_ascii", "hex_ascii",
...@@ -119,6 +120,7 @@ struct debug_view debug_hex_ascii_view = { ...@@ -119,6 +120,7 @@ struct debug_view debug_hex_ascii_view = {
NULL, NULL,
NULL NULL
}; };
EXPORT_SYMBOL(debug_hex_ascii_view);
static struct debug_view debug_level_view = { static struct debug_view debug_level_view = {
"level", "level",
...@@ -155,6 +157,7 @@ struct debug_view debug_sprintf_view = { ...@@ -155,6 +157,7 @@ struct debug_view debug_sprintf_view = {
NULL, NULL,
NULL NULL
}; };
EXPORT_SYMBOL(debug_sprintf_view);
/* used by dump analysis tools to determine version of debug feature */ /* used by dump analysis tools to determine version of debug feature */
static unsigned int __used debug_feature_version = __DEBUG_FEATURE_VERSION; static unsigned int __used debug_feature_version = __DEBUG_FEATURE_VERSION;
...@@ -730,6 +733,7 @@ debug_info_t *debug_register(const char *name, int pages_per_area, ...@@ -730,6 +733,7 @@ debug_info_t *debug_register(const char *name, int pages_per_area,
return debug_register_mode(name, pages_per_area, nr_areas, buf_size, return debug_register_mode(name, pages_per_area, nr_areas, buf_size,
S_IRUSR | S_IWUSR, 0, 0); S_IRUSR | S_IWUSR, 0, 0);
} }
EXPORT_SYMBOL(debug_register);
/* /*
* debug_unregister: * debug_unregister:
...@@ -748,6 +752,7 @@ debug_unregister(debug_info_t * id) ...@@ -748,6 +752,7 @@ debug_unregister(debug_info_t * id)
out: out:
return; return;
} }
EXPORT_SYMBOL(debug_unregister);
/* /*
* debug_set_size: * debug_set_size:
...@@ -810,7 +815,7 @@ debug_set_level(debug_info_t* id, int new_level) ...@@ -810,7 +815,7 @@ debug_set_level(debug_info_t* id, int new_level)
} }
spin_unlock_irqrestore(&id->lock,flags); spin_unlock_irqrestore(&id->lock,flags);
} }
EXPORT_SYMBOL(debug_set_level);
/* /*
* proceed_active_entry: * proceed_active_entry:
...@@ -930,7 +935,7 @@ debug_stop_all(void) ...@@ -930,7 +935,7 @@ debug_stop_all(void)
if (debug_stoppable) if (debug_stoppable)
debug_active = 0; debug_active = 0;
} }
EXPORT_SYMBOL(debug_stop_all);
void debug_set_critical(void) void debug_set_critical(void)
{ {
...@@ -963,6 +968,7 @@ debug_event_common(debug_info_t * id, int level, const void *buf, int len) ...@@ -963,6 +968,7 @@ debug_event_common(debug_info_t * id, int level, const void *buf, int len)
return active; return active;
} }
EXPORT_SYMBOL(debug_event_common);
/* /*
* debug_exception_common: * debug_exception_common:
...@@ -990,6 +996,7 @@ debug_entry_t ...@@ -990,6 +996,7 @@ debug_entry_t
return active; return active;
} }
EXPORT_SYMBOL(debug_exception_common);
/* /*
* counts arguments in format string for sprintf view * counts arguments in format string for sprintf view
...@@ -1043,6 +1050,7 @@ debug_sprintf_event(debug_info_t* id, int level,char *string,...) ...@@ -1043,6 +1050,7 @@ debug_sprintf_event(debug_info_t* id, int level,char *string,...)
return active; return active;
} }
EXPORT_SYMBOL(debug_sprintf_event);
/* /*
* debug_sprintf_exception: * debug_sprintf_exception:
...@@ -1081,25 +1089,7 @@ debug_sprintf_exception(debug_info_t* id, int level,char *string,...) ...@@ -1081,25 +1089,7 @@ debug_sprintf_exception(debug_info_t* id, int level,char *string,...)
return active; return active;
} }
EXPORT_SYMBOL(debug_sprintf_exception);
/*
* debug_init:
* - is called exactly once to initialize the debug feature
*/
static int
__init debug_init(void)
{
int rc = 0;
s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table);
mutex_lock(&debug_mutex);
debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL);
initialized = 1;
mutex_unlock(&debug_mutex);
return rc;
}
/* /*
* debug_register_view: * debug_register_view:
...@@ -1147,6 +1137,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view) ...@@ -1147,6 +1137,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view)
out: out:
return rc; return rc;
} }
EXPORT_SYMBOL(debug_register_view);
/* /*
* debug_unregister_view: * debug_unregister_view:
...@@ -1176,6 +1167,7 @@ debug_unregister_view(debug_info_t * id, struct debug_view *view) ...@@ -1176,6 +1167,7 @@ debug_unregister_view(debug_info_t * id, struct debug_view *view)
out: out:
return rc; return rc;
} }
EXPORT_SYMBOL(debug_unregister_view);
static inline char * static inline char *
debug_get_user_string(const char __user *user_buf, size_t user_len) debug_get_user_string(const char __user *user_buf, size_t user_len)
...@@ -1485,6 +1477,7 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, ...@@ -1485,6 +1477,7 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view,
except_str, entry->id.fields.cpuid, (void *) caller); except_str, entry->id.fields.cpuid, (void *) caller);
return rc; return rc;
} }
EXPORT_SYMBOL(debug_dflt_header_fn);
/* /*
* prints debug data sprintf-formated: * prints debug data sprintf-formated:
...@@ -1533,33 +1526,16 @@ debug_sprintf_format_fn(debug_info_t * id, struct debug_view *view, ...@@ -1533,33 +1526,16 @@ debug_sprintf_format_fn(debug_info_t * id, struct debug_view *view,
} }
/* /*
* clean up module * debug_init:
* - is called exactly once to initialize the debug feature
*/ */
static void __exit debug_exit(void) static int __init debug_init(void)
{ {
debugfs_remove(debug_debugfs_root_entry); s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table);
unregister_sysctl_table(s390dbf_sysctl_header); mutex_lock(&debug_mutex);
return; debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT, NULL);
initialized = 1;
mutex_unlock(&debug_mutex);
return 0;
} }
/*
* module definitions
*/
postcore_initcall(debug_init); postcore_initcall(debug_init);
module_exit(debug_exit);
MODULE_LICENSE("GPL");
EXPORT_SYMBOL(debug_register);
EXPORT_SYMBOL(debug_unregister);
EXPORT_SYMBOL(debug_set_level);
EXPORT_SYMBOL(debug_stop_all);
EXPORT_SYMBOL(debug_register_view);
EXPORT_SYMBOL(debug_unregister_view);
EXPORT_SYMBOL(debug_event_common);
EXPORT_SYMBOL(debug_exception_common);
EXPORT_SYMBOL(debug_hex_ascii_view);
EXPORT_SYMBOL(debug_raw_view);
EXPORT_SYMBOL(debug_dflt_header_fn);
EXPORT_SYMBOL(debug_sprintf_view);
EXPORT_SYMBOL(debug_sprintf_exception);
EXPORT_SYMBOL(debug_sprintf_event);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册