Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=732aeacff6b2fcf3750cad9018bdd663a21a6a12 Commit: 732aeacff6b2fcf3750cad9018bdd663a21a6a12 Parent: 54b2c8f93d7c3ddc04b55666b878fec437d32983 Author: Artem Bityutskiy <[EMAIL PROTECTED]> AuthorDate: Sat Dec 15 15:09:07 2007 +0200 Committer: Artem Bityutskiy <[EMAIL PROTECTED]> CommitDate: Wed Dec 26 19:15:14 2007 +0200
UBI: minor tidy-ups Signed-off-by: Artem Bityutskiy <[EMAIL PROTECTED]> --- drivers/mtd/ubi/vmt.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index e44948d..58d6abe 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c @@ -71,7 +71,6 @@ static ssize_t vol_attribute_show(struct device *dev, struct device_attribute *attr, char *buf) { int ret = -ENODEV; - struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); spin_lock(&vol->ubi->volumes_lock); @@ -79,6 +78,7 @@ static ssize_t vol_attribute_show(struct device *dev, spin_unlock(&vol->ubi->volumes_lock); return ret; } + if (attr == &attr_vol_reserved_ebs) ret = sprintf(buf, "%d\n", vol->reserved_pebs); else if (attr == &attr_vol_type) { @@ -95,9 +95,9 @@ static ssize_t vol_attribute_show(struct device *dev, ret = sprintf(buf, "%d\n", vol->corrupted); else if (attr == &attr_vol_alignment) ret = sprintf(buf, "%d\n", vol->alignment); - else if (attr == &attr_vol_usable_eb_size) { + else if (attr == &attr_vol_usable_eb_size) ret = sprintf(buf, "%d\n", vol->usable_leb_size); - } else if (attr == &attr_vol_data_bytes) + else if (attr == &attr_vol_data_bytes) ret = sprintf(buf, "%lld\n", vol->used_bytes); else if (attr == &attr_vol_upd_marker) ret = sprintf(buf, "%d\n", vol->upd_marker); @@ -111,6 +111,7 @@ static ssize_t vol_attribute_show(struct device *dev, static void vol_release(struct device *dev) { struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); + ubi_assert(vol->removed); kfree(vol); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html