Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756230AbbHYXBC (ORCPT ); Tue, 25 Aug 2015 19:01:02 -0400 Received: from mail1.windriver.com ([147.11.146.13]:42047 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbbHYXA7 (ORCPT ); Tue, 25 Aug 2015 19:00:59 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Matt Fleming , Peter Jones , Subject: [PATCH] drivers/firmware: make efi/esrt.c driver explicitly non-modular Date: Tue, 25 Aug 2015 19:00:48 -0400 Message-ID: <1440543648-27328-1-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.5.0 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 Content-Length: 1918 Lines: 67 The Kconfig for this driver is currently hidden with: config EFI_ESRT bool ...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. We leave some tags like MODULE_AUTHOR for documentation purposes. We don't replace module.h with init.h since the file already has that. Cc: Matt Fleming Cc: Peter Jones Cc: linux-efi@vger.kernel.org Signed-off-by: Paul Gortmaker diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c index a5b95d61ae71..22c5285f7705 100644 --- a/drivers/firmware/efi/esrt.c +++ b/drivers/firmware/efi/esrt.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -450,22 +449,10 @@ err: esrt = NULL; return error; } +device_initcall(esrt_sysfs_init); -static void __exit esrt_sysfs_exit(void) -{ - pr_debug("esrt-sysfs: unloading.\n"); - cleanup_entry_list(); - kset_unregister(esrt_kset); - sysfs_remove_group(esrt_kobj, &esrt_attr_group); - kfree(esrt); - esrt = NULL; - kobject_del(esrt_kobj); - kobject_put(esrt_kobj); -} - -module_init(esrt_sysfs_init); -module_exit(esrt_sysfs_exit); - +/* MODULE_AUTHOR("Peter Jones "); MODULE_DESCRIPTION("EFI System Resource Table support"); MODULE_LICENSE("GPL"); +*/ -- 2.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/