]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: phram: Module parameters add writable permissions
authorXiaoming Ni <nixiaoming@huawei.com>
Sun, 14 Jul 2019 03:57:18 +0000 (11:57 +0800)
committerRichard Weinberger <richard@nod.at>
Sun, 15 Sep 2019 21:50:38 +0000 (23:50 +0200)
The phram code implements managing multiple devices through a linked
list.
However, due to the module parameter permission of 0, the
/sys/module/phram/parameters/phram interface is missing.
The command line arguments in insmod can only create one device.

Therefore, add writable permissions to the module parameters, create
/sys/module/phram/parameters/phram interface, and create multi-device
support.

Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/devices/phram.c

index c467286ca007175d3f48e01b8b1e2f9f54f57f9c..931e5c2481b5bc465218bc054f29af44bfef35e4 100644 (file)
@@ -294,7 +294,7 @@ static int phram_param_call(const char *val, const struct kernel_param *kp)
 #endif
 }
 
-module_param_call(phram, phram_param_call, NULL, NULL, 000);
+module_param_call(phram, phram_param_call, NULL, NULL, 0200);
 MODULE_PARM_DESC(phram, "Memory region to map. \"phram=<name>,<start>,<length>\"");