From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgw-fb01.nokia.com ([192.100.122.235]) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1KKrpO-0002L8-Uv for linux-mtd@lists.infradead.org; Mon, 21 Jul 2008 09:37:11 +0000 Received: from mgw-mx03.nokia.com (mgw-mx03.nokia.com [192.100.122.230]) by mgw-fb01.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id m6L9FT0l016738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Jul 2008 12:15:30 +0300 From: Artem Bityutskiy To: David Woodhouse Date: Mon, 21 Jul 2008 12:12:19 +0300 Message-Id: <20080721091219.24602.43790.sendpatchset@localhost.localdomain> In-Reply-To: <20080721091214.24602.67601.sendpatchset@localhost.localdomain> References: <20080721091214.24602.67601.sendpatchset@localhost.localdomain> Subject: [PATCH] MTD: nandsim: allow changing some module parameters Cc: Artem Bityutskiy , linux-mtd@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Artem Bityutskiy Subject: [PATCH] MTD: nandsim: allow changing some module parameters Grant write permissions to some nandsim module parameters to make it possible to change them runtime e.g., via sysfs: echo 1 > /sys/module/nandsim/parameters/rptwear There is no reason to have that file read-only. This patches also changes the permissions from octal to S_* format. Signed-off-by: Artem Bityutskiy --- drivers/mtd/nand/nandsim.c | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 8e73a66..6e4703e 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -77,21 +77,21 @@ static char *gravepages = NULL; static unsigned int rptwear = 0; static unsigned int overridesize = 0; -module_param(first_id_byte, uint, 0400); -module_param(second_id_byte, uint, 0400); -module_param(third_id_byte, uint, 0400); -module_param(fourth_id_byte, uint, 0400); -module_param(bus_width, uint, 0400); -module_param(log, uint, 0400); -module_param(dbg, uint, 0400); -module_param_array(parts, ulong, &parts_num, 0400); -module_param(badblocks, charp, 0400); -module_param(weakblocks, charp, 0400); -module_param(weakpages, charp, 0400); -module_param(bitflips, uint, 0400); -module_param(gravepages, charp, 0400); -module_param(rptwear, uint, 0400); -module_param(overridesize, uint, 0400); +module_param(first_id_byte, uint, S_IRUGO); +module_param(second_id_byte, uint, S_IRUGO); +module_param(third_id_byte, uint, S_IRUGO); +module_param(fourth_id_byte, uint, S_IRUGO); +module_param(bus_width, uint, S_IRUGO); +module_param(log, uint, S_IRUGO | S_IWUSR); +module_param(dbg, uint, S_IRUGO | S_IWUSR); +module_param(badblocks, charp, S_IRUGO); +module_param(weakblocks, charp, S_IRUGO); +module_param(weakpages, charp, S_IRUGO); +module_param(bitflips, uint, S_IRUGO | S_IWUSR); +module_param(gravepages, charp, S_IRUGO); +module_param(rptwear, uint, S_IRUGO | S_IWUSR); +module_param(overridesize, uint, S_IRUGO); +module_param_array(parts, ulong, &parts_num, S_IRUGO); MODULE_PARM_DESC(first_id_byte, "The first byte returned by NAND Flash 'read ID' command (manufacturer ID)"); MODULE_PARM_DESC(second_id_byte, "The second byte returned by NAND Flash 'read ID' command (chip ID)"); -- 1.5.4.1