linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/firmware: make efi/esrt.c driver explicitly non-modular
@ 2015-08-25 23:00 Paul Gortmaker
  2015-08-26 17:11 ` Matt Fleming
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2015-08-25 23:00 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Paul Gortmaker, Matt Fleming, Peter Jones,
	linux-efi-u79uwXL29TY76Z2rM5mHXA

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 <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>

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 <linux/kobject.h>
 #include <linux/list.h>
 #include <linux/memblock.h>
-#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/types.h>
 
@@ -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 <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>");
 MODULE_DESCRIPTION("EFI System Resource Table support");
 MODULE_LICENSE("GPL");
+*/
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-01 13:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25 23:00 [PATCH] drivers/firmware: make efi/esrt.c driver explicitly non-modular Paul Gortmaker
2015-08-26 17:11 ` Matt Fleming
     [not found]   ` <20150826171128.GA2837-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-08-31 13:52     ` Peter Jones
     [not found]       ` <20150831135201.GA17921-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-01  8:57         ` Matt Fleming
     [not found]           ` <20150901085708.GD2823-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-09-01 13:19             ` Peter Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).