* [PATCH] miscdevice: introduce builtin_misc_device
@ 2016-10-22 22:36 Paul Gortmaker
2016-10-28 12:22 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2016-10-22 22:36 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Gortmaker, Arnd Bergmann, Greg Kroah-Hartman
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>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
[I've got several users of this in my local queue; but I'll stagger
those and this by a merge window to avoid dependency issues.]
include/linux/miscdevice.h | 7 +++++++
1 file changed, 7 insertions(+)
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.
*/
--
2.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] miscdevice: introduce builtin_misc_device
2016-10-22 22:36 [PATCH] miscdevice: introduce builtin_misc_device Paul Gortmaker
@ 2016-10-28 12:22 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2016-10-28 12:22 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: linux-kernel, Arnd Bergmann
On Sat, Oct 22, 2016 at 06:36:05PM -0400, Paul Gortmaker wrote:
> 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>
> ---
>
> [I've got several users of this in my local queue; but I'll stagger
> those and this by a merge window to avoid dependency issues.]
Send them on, I'll be glad to take them through my tree if you want to.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-28 12:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22 22:36 [PATCH] miscdevice: introduce builtin_misc_device Paul Gortmaker
2016-10-28 12:22 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.