aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/core.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-10-29 16:38:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 10:55:45 -0500
commit389b2a1c0e90549a31f16f5be43cff44ee13cf77 (patch)
tree6b00af77bc980eb5149f1bb8dc8249d2df650997 /drivers/lightnvm/core.c
parentc4d7e5101085c19094470780ffe6cb788e53765f (diff)
lightnvm: make core.c explicitly non-modular
The Kconfig currently controlling compilation of this code is: drivers/lightnvm/Kconfig:menuconfig NVM drivers/lightnvm/Kconfig: bool "Open-Channel SSD target support" ...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_misc_driver translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We replace module.h with moduleparam.h because this file still uses module params to control behaviour. Also note that MODULE_ALIAS is a no-op for non-modular code. Cc: Matias Bjorling <mb@lightnvm.io> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/lightnvm/core.c')
-rw-r--r--drivers/lightnvm/core.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 1cac0f8bc0dc..2329f050ff82 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -22,7 +22,7 @@
22#include <linux/types.h> 22#include <linux/types.h>
23#include <linux/sem.h> 23#include <linux/sem.h>
24#include <linux/bitmap.h> 24#include <linux/bitmap.h>
25#include <linux/module.h> 25#include <linux/moduleparam.h>
26#include <linux/miscdevice.h> 26#include <linux/miscdevice.h>
27#include <linux/lightnvm.h> 27#include <linux/lightnvm.h>
28#include <linux/sched/sysctl.h> 28#include <linux/sched/sysctl.h>
@@ -889,6 +889,10 @@ static const struct kernel_param_ops nvm_configure_by_str_event_param_ops = {
889 .get = nvm_configure_get, 889 .get = nvm_configure_get,
890}; 890};
891 891
892/*
893 * Not available as modular, but easiest way to remain compatible with
894 * existing boot arg behaviour is to continue using module param here.
895 */
892#undef MODULE_PARAM_PREFIX 896#undef MODULE_PARAM_PREFIX
893#define MODULE_PARAM_PREFIX "lnvm." 897#define MODULE_PARAM_PREFIX "lnvm."
894 898
@@ -1162,10 +1166,4 @@ static struct miscdevice _nvm_misc = {
1162 .nodename = "lightnvm/control", 1166 .nodename = "lightnvm/control",
1163 .fops = &_ctl_fops, 1167 .fops = &_ctl_fops,
1164}; 1168};
1165module_misc_device(_nvm_misc); 1169builtin_misc_device(_nvm_misc);
1166
1167MODULE_ALIAS_MISCDEV(MISC_DYNAMIC_MINOR);
1168
1169MODULE_AUTHOR("Matias Bjorling <m@bjorling.me>");
1170MODULE_LICENSE("GPL v2");
1171MODULE_VERSION("0.1");