diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-10-23 01:36:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-28 15:22:11 +0300 |
commit | f71082f815bf0b9599b97546cf1dd057c789c3c1 (patch) | |
tree | 7bb4104124f684d53ce578d9d12e952271083616 | |
parent | 1e4edb3fe93ff9f7b678a8f1b8d9df717edf6ad9 (diff) | |
download | linux-f71082f815bf0b9599b97546cf1dd057c789c3c1.tar.xz |
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 f309d4443130bf814e991f836e919dca22df37ae ("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>
-rw-r--r-- | include/linux/miscdevice.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 722698a43d79..a426cb55dc43 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -72,6 +72,13 @@ 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. */ |