mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
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 f309d44431
("platform_device:
better support builtin boilerplate avoidance").
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1e4edb3fe9
commit
f71082f815
1 changed files with 7 additions and 0 deletions
|
@ -71,6 +71,13 @@ struct miscdevice {
|
|||
extern int misc_register(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
|
||||
* call. This helps in eleminating of boilerplate code.
|
||||
|
|
Loading…
Reference in a new issue