Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144741
b: refs/heads/master
c: e769354
h: refs/heads/master
i:
  144739: 623e655
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Apr 19, 2009
1 parent 71cb349 commit 336211a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2fdb11449ca82f4f1907fce4929df4e0bd267c50
refs/heads/master: e7693548950ea5801d5d8b00414aed37033cf972
12 changes: 12 additions & 0 deletions trunk/drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ static ssize_t mtd_writesize_show(struct device *dev,
}
static DEVICE_ATTR(writesize, S_IRUGO, mtd_writesize_show, NULL);

static ssize_t mtd_subpagesize_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct mtd_info *mtd = dev_to_mtd(dev);
unsigned int subpagesize = mtd->writesize >> mtd->subpage_sft;

return snprintf(buf, PAGE_SIZE, "%u\n", subpagesize);

}
static DEVICE_ATTR(subpagesize, S_IRUGO, mtd_subpagesize_show, NULL);

static ssize_t mtd_oobsize_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
Expand Down Expand Up @@ -169,6 +180,7 @@ static struct attribute *mtd_attrs[] = {
&dev_attr_size.attr,
&dev_attr_erasesize.attr,
&dev_attr_writesize.attr,
&dev_attr_subpagesize.attr,
&dev_attr_oobsize.attr,
&dev_attr_numeraseregions.attr,
&dev_attr_name.attr,
Expand Down

0 comments on commit 336211a

Please sign in to comment.