提交 f71082f8 编写于 作者: P Paul Gortmaker 提交者: Greg Kroah-Hartman

miscdevice: introduce builtin_misc_device

This is basically the same as module_misc_device but without the
presence of an exit/remove function.   Similar in nature to the
commit f309d444 ("platform_device:
better support builtin boilerplate avoidance").

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 1e4edb3f
...@@ -71,6 +71,13 @@ struct miscdevice { ...@@ -71,6 +71,13 @@ struct miscdevice {
extern int misc_register(struct miscdevice *misc); extern int misc_register(struct miscdevice *misc);
extern void misc_deregister(struct miscdevice *misc); extern void misc_deregister(struct miscdevice *misc);
/*
* Helper macro for drivers that don't do anything special in the initcall.
* This helps in eleminating of boilerplate code.
*/
#define builtin_misc_device(__misc_device) \
builtin_driver(__misc_device, misc_register)
/* /*
* Helper macro for drivers that don't do anything special in module init / exit * Helper macro for drivers that don't do anything special in module init / exit
* call. This helps in eleminating of boilerplate code. * call. This helps in eleminating of boilerplate code.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册