Commit 6023d236 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Michal Marek

export.h: use __is_defined() to check if __KSYM_* is defined

Here the need is for a macro that checks whether the given symbol is
defined or not, which has nothing to do with config.

The new macro __is_defined() is a better fit for this case.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent 4f920843
...@@ -82,7 +82,7 @@ extern struct module __this_module; ...@@ -82,7 +82,7 @@ extern struct module __this_module;
#include <generated/autoksyms.h> #include <generated/autoksyms.h>
#define __EXPORT_SYMBOL(sym, sec) \ #define __EXPORT_SYMBOL(sym, sec) \
__cond_export_sym(sym, sec, config_enabled(__KSYM_##sym)) __cond_export_sym(sym, sec, __is_defined(__KSYM_##sym))
#define __cond_export_sym(sym, sec, conf) \ #define __cond_export_sym(sym, sec, conf) \
___cond_export_sym(sym, sec, conf) ___cond_export_sym(sym, sec, conf)
#define ___cond_export_sym(sym, sec, enabled) \ #define ___cond_export_sym(sym, sec, enabled) \
......
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