提交 18aefbc5 编写于 作者: P Paul Gortmaker 提交者: Matt Fleming

drivers/firmware: Make efi/esrt.c driver explicitly non-modular

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: Peter Jones <pjones@redhat.com>
Cc: linux-efi@vger.kernel.org
Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
上级 0ce423b6
......@@ -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 @@ static int __init esrt_sysfs_init(void)
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@redhat.com>");
MODULE_DESCRIPTION("EFI System Resource Table support");
MODULE_LICENSE("GPL");
*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册