All of lore.kernel.org
 help / color / mirror / Atom feed
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 resend] MTD: nandsim: allow changing some module parameters
Date: Mon, 28 Jul 2008 10:06:31 +0300	[thread overview]
Message-ID: <20080728070631.4707.68077.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080728070626.4707.99096.sendpatchset@localhost.localdomain>

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

  reply	other threads:[~2008-07-28  7:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28  7:06 [PATCH resend] MTD: nandsim: remove useless module parameters Artem Bityutskiy
2008-07-28  7:06 ` Artem Bityutskiy [this message]
2008-09-01 11:26   ` [PATCH resend] MTD: nandsim: allow changing some " David Woodhouse
2008-09-01 11:25     ` Artem Bityutskiy

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=20080728070631.4707.68077.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.