[PATCH 3/3] MTD: remove the 'flags' sysfs file

Artem Bityutskiy
2009-04-21T09:32:35Z

It is bad idea to export the MTD flags via sysfs. It is much
cleaner to create a per-flag sysfs file which contains 0 or
1. It is difficult for users to parse '0x400'. We have ioctls
which return the flags, no need to add this to sysfs.

Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
drivers/mtd/mtdcore.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 07105a8..8067d0c 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -91,16 +91,6 @@ static ssize_t mtd_type_show(struct device *dev,
}
static DEVICE_ATTR(type, S_IRUGO, mtd_type_show, NULL);

-static ssize_t mtd_flags_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- struct mtd_info *mtd = dev_to_mtd(dev);
-
- return snprintf(buf, PAGE_SIZE, "0x%lx\n", (unsigned long)mtd->flags);
-
-}
-static DEVICE_ATTR(flags, S_IRUGO, mtd_flags_show, NULL);
-
static ssize_t mtd_size_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -196,7 +186,6 @@ static DEVICE_ATTR(writable, S_IRUGO, mtd_writable_show, NULL);

static struct attribute *mtd_attrs[] = {
&dev_attr_type.attr,
- &dev_attr_flags.attr,
&dev_attr_size.attr,
&dev_attr_erasesize.attr,
&dev_attr_writesize.attr,