|
@@ -250,6 +250,15 @@ static ssize_t mtd_name_show(struct device *dev,
|
|
|
}
|
|
|
static DEVICE_ATTR(name, S_IRUGO, mtd_name_show, NULL);
|
|
|
|
|
|
+static ssize_t mtd_ecc_strength_show(struct device *dev,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
+{
|
|
|
+ struct mtd_info *mtd = dev_get_drvdata(dev);
|
|
|
+
|
|
|
+ return snprintf(buf, PAGE_SIZE, "%u\n", mtd->ecc_strength);
|
|
|
+}
|
|
|
+static DEVICE_ATTR(ecc_strength, S_IRUGO, mtd_ecc_strength_show, NULL);
|
|
|
+
|
|
|
static struct attribute *mtd_attrs[] = {
|
|
|
&dev_attr_type.attr,
|
|
|
&dev_attr_flags.attr,
|
|
@@ -260,6 +269,7 @@ static struct attribute *mtd_attrs[] = {
|
|
|
&dev_attr_oobsize.attr,
|
|
|
&dev_attr_numeraseregions.attr,
|
|
|
&dev_attr_name.attr,
|
|
|
+ &dev_attr_ecc_strength.attr,
|
|
|
NULL,
|
|
|
};
|
|
|
|