From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: [PATCH v2 3/5] drivers/xen: make xenbus_dev_[front/back]end explicitly non-modular Date: Sun, 21 Feb 2016 19:06:06 -0500 Message-ID: <1456099568-5154-4-git-send-email-paul.gortmaker__18391.5720823736$1456099698$gmane$org@windriver.com> References: <1456099568-5154-1-git-send-email-paul.gortmaker@windriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aXe1W-0002Qw-IJ for xen-devel@lists.xenproject.org; Mon, 22 Feb 2016 00:06:46 +0000 In-Reply-To: <1456099568-5154-1-git-send-email-paul.gortmaker@windriver.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: linux-kernel@vger.kernel.org Cc: Stefano Stabellini , Paul Gortmaker , David Vrabel , xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org The Makefile / Kconfig currently controlling compilation here is: obj-y += xenbus_dev_frontend.o [...] obj-$(CONFIG_XEN_BACKEND) += xenbus_dev_backend.o ...with: drivers/xen/Kconfig:config XEN_BACKEND drivers/xen/Kconfig: bool "Backend driver support" ...meaning that they currently are not being built as modules by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag since all that information is already contained at the top of the file in the comments. Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Stefano Stabellini Reviewed-by: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Signed-off-by: Paul Gortmaker --- drivers/xen/xenbus/xenbus_dev_backend.c | 13 ++----------- drivers/xen/xenbus/xenbus_dev_frontend.c | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/xen/xenbus/xenbus_dev_backend.c b/drivers/xen/xenbus/xenbus_dev_backend.c index ee6d9efd7b76..4a41ac9af966 100644 --- a/drivers/xen/xenbus/xenbus_dev_backend.c +++ b/drivers/xen/xenbus/xenbus_dev_backend.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include @@ -18,8 +18,6 @@ #include "xenbus_comms.h" -MODULE_LICENSE("GPL"); - static int xenbus_backend_open(struct inode *inode, struct file *filp) { if (!capable(CAP_SYS_ADMIN)) @@ -132,11 +130,4 @@ static int __init xenbus_backend_init(void) pr_err("Could not register xenbus backend device\n"); return err; } - -static void __exit xenbus_backend_exit(void) -{ - misc_deregister(&xenbus_backend_dev); -} - -module_init(xenbus_backend_init); -module_exit(xenbus_backend_exit); +device_initcall(xenbus_backend_init); diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index 9433e46518c8..8c0a359ab4a8 100644 --- a/drivers/xen/xenbus/xenbus_dev_frontend.c +++ b/drivers/xen/xenbus/xenbus_dev_frontend.c @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include "xenbus_comms.h" @@ -63,8 +63,6 @@ #include #include -MODULE_LICENSE("GPL"); - /* * An element of a list of outstanding transactions, for which we're * still waiting a reply. @@ -624,11 +622,4 @@ static int __init xenbus_init(void) pr_err("Could not register xenbus frontend device\n"); return err; } - -static void __exit xenbus_exit(void) -{ - misc_deregister(&xenbus_dev); -} - -module_init(xenbus_init); -module_exit(xenbus_exit); +device_initcall(xenbus_init); -- 2.6.1