From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756175AbcJVWgg (ORCPT ); Sat, 22 Oct 2016 18:36:36 -0400 Received: from mail5.windriver.com ([192.103.53.11]:57576 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756077AbcJVWgc (ORCPT ); Sat, 22 Oct 2016 18:36:32 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH] miscdevice: introduce builtin_misc_device Date: Sat, 22 Oct 2016 18:36:05 -0400 Message-ID: <20161022223605.11585-1-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Greg Kroah-Hartman Signed-off-by: Paul Gortmaker --- [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