From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbcBNUdb (ORCPT ); Sun, 14 Feb 2016 15:33:31 -0500 Received: from mail.windriver.com ([147.11.1.11]:39347 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbcBNUd0 (ORCPT ); Sun, 14 Feb 2016 15:33:26 -0500 From: Paul Gortmaker To: CC: Paul Gortmaker , Konrad Rzeszutek Wilk , Boris Ostrovsky , David Vrabel , Subject: [PATCH 5/5] drivers/xen: make platform-pci.c explicitly non-modular Date: Sun, 14 Feb 2016 15:32:50 -0500 Message-ID: <1455481970-15239-6-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1455481970-15239-1-git-send-email-paul.gortmaker@windriver.com> References: <1455481970-15239-1-git-send-email-paul.gortmaker@windriver.com> 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 The Kconfig currently controlling compilation of this code is: arch/x86/xen/Kconfig:config XEN_PVHVM arch/x86/xen/Kconfig: def_bool y ...meaning that it currently is not being built as a module 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. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: xen-devel@lists.xenproject.org Signed-off-by: Paul Gortmaker --- drivers/xen/platform-pci.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index 3454973dc3bb..302232518c98 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c @@ -2,6 +2,9 @@ * platform-pci.c * * Xen platform PCI device driver + * + * Authors: ssmith@xensource.com and stefano.stabellini@eu.citrix.com + * * Copyright (c) 2005, Intel Corporation. * Copyright (c) 2007, XenSource Inc. * Copyright (c) 2010, Citrix @@ -24,7 +27,7 @@ #include #include -#include +#include #include #include @@ -36,10 +39,6 @@ #define DRV_NAME "xen-platform-pci" -MODULE_AUTHOR("ssmith@xensource.com and stefano.stabellini@eu.citrix.com"); -MODULE_DESCRIPTION("Xen platform PCI device"); -MODULE_LICENSE("GPL"); - static unsigned long platform_mmio; static unsigned long platform_mmio_alloc; static unsigned long platform_mmiolen; @@ -181,8 +180,6 @@ static struct pci_device_id platform_pci_tbl[] = { {0,} }; -MODULE_DEVICE_TABLE(pci, platform_pci_tbl); - static struct pci_driver platform_driver = { .name = DRV_NAME, .probe = platform_pci_init, @@ -192,9 +189,8 @@ static struct pci_driver platform_driver = { #endif }; -static int __init platform_pci_module_init(void) +static int __init platform_pci_xen_init(void) { return pci_register_driver(&platform_driver); } - -module_init(platform_pci_module_init); +device_initcall(platform_pci_xen_init); -- 2.6.1