From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
linux-mtd@lists.infradead.org
Subject: [PATCH] MTD: nandsim: allow changing some module parameters
Date: Mon, 21 Jul 2008 12:12:19 +0300 [thread overview]
Message-ID: <20080721091219.24602.43790.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080721091214.24602.67601.sendpatchset@localhost.localdomain>
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
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 <Artem.Bityutskiy@nokia.com>
---
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
prev parent reply other threads:[~2008-07-21 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 9:12 [PATCH] MTD: nandsim: remove useless module parameters Artem Bityutskiy
2008-07-21 9:12 ` Artem Bityutskiy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080721091219.24602.43790.sendpatchset@localhost.localdomain \
--to=artem.bityutskiy@nokia.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox