From patchwork Sun Feb 14 20:32:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 8303241 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C418D9F38B for ; Sun, 14 Feb 2016 20:36:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE5E4204D8 for ; Sun, 14 Feb 2016 20:36:16 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07C40200FE for ; Sun, 14 Feb 2016 20:36:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aV3ME-0006d7-Cf; Sun, 14 Feb 2016 20:33:26 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aV3MB-0006bs-SG for xen-devel@lists.xenproject.org; Sun, 14 Feb 2016 20:33:23 +0000 Received: from [193.109.254.147] by server-5.bemta-14.messagelabs.com id DB/50-23366-394E0C65; Sun, 14 Feb 2016 20:33:23 +0000 X-Env-Sender: Paul.Gortmaker@windriver.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1455482000!23766716!1 X-Originating-IP: [147.11.1.11] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12420 invoked from network); 14 Feb 2016 20:33:22 -0000 Received: from mail.windriver.com (HELO mail.windriver.com) (147.11.1.11) by server-6.tower-27.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 14 Feb 2016 20:33:22 -0000 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id u1EKXJAM025145 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 14 Feb 2016 12:33:19 -0800 (PST) Received: from yow-lpgnfs-02.corp.ad.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.248.2; Sun, 14 Feb 2016 12:33:18 -0800 From: Paul Gortmaker To: 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 Cc: Paul Gortmaker , Boris Ostrovsky , xen-devel@lists.xenproject.org, David Vrabel Subject: [Xen-devel] [PATCH 5/5] drivers/xen: make platform-pci.c explicitly non-modular X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);