diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-15 08:09:07 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-26 12:15:14 -0500 |
commit | 732aeacff6b2fcf3750cad9018bdd663a21a6a12 (patch) | |
tree | ba1014f5878f124842a6f9931e7bfce2198e4cfb /drivers/mtd/ubi/vmt.c | |
parent | 54b2c8f93d7c3ddc04b55666b878fec437d32983 (diff) |
UBI: minor tidy-ups
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r-- | 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 e44948de7dd9..58d6abe50bfc 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, | |||
71 | struct device_attribute *attr, char *buf) | 71 | struct device_attribute *attr, char *buf) |
72 | { | 72 | { |
73 | int ret = -ENODEV; | 73 | int ret = -ENODEV; |
74 | |||
75 | struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); | 74 | struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); |
76 | 75 | ||
77 | spin_lock(&vol->ubi->volumes_lock); | 76 | spin_lock(&vol->ubi->volumes_lock); |
@@ -79,6 +78,7 @@ static ssize_t vol_attribute_show(struct device *dev, | |||
79 | spin_unlock(&vol->ubi->volumes_lock); | 78 | spin_unlock(&vol->ubi->volumes_lock); |
80 | return ret; | 79 | return ret; |
81 | } | 80 | } |
81 | |||
82 | if (attr == &attr_vol_reserved_ebs) | 82 | if (attr == &attr_vol_reserved_ebs) |
83 | ret = sprintf(buf, "%d\n", vol->reserved_pebs); | 83 | ret = sprintf(buf, "%d\n", vol->reserved_pebs); |
84 | else if (attr == &attr_vol_type) { | 84 | else if (attr == &attr_vol_type) { |
@@ -95,9 +95,9 @@ static ssize_t vol_attribute_show(struct device *dev, | |||
95 | ret = sprintf(buf, "%d\n", vol->corrupted); | 95 | ret = sprintf(buf, "%d\n", vol->corrupted); |
96 | else if (attr == &attr_vol_alignment) | 96 | else if (attr == &attr_vol_alignment) |
97 | ret = sprintf(buf, "%d\n", vol->alignment); | 97 | ret = sprintf(buf, "%d\n", vol->alignment); |
98 | else if (attr == &attr_vol_usable_eb_size) { | 98 | else if (attr == &attr_vol_usable_eb_size) |
99 | ret = sprintf(buf, "%d\n", vol->usable_leb_size); | 99 | ret = sprintf(buf, "%d\n", vol->usable_leb_size); |
100 | } else if (attr == &attr_vol_data_bytes) | 100 | else if (attr == &attr_vol_data_bytes) |
101 | ret = sprintf(buf, "%lld\n", vol->used_bytes); | 101 | ret = sprintf(buf, "%lld\n", vol->used_bytes); |
102 | else if (attr == &attr_vol_upd_marker) | 102 | else if (attr == &attr_vol_upd_marker) |
103 | ret = sprintf(buf, "%d\n", vol->upd_marker); | 103 | ret = sprintf(buf, "%d\n", vol->upd_marker); |
@@ -111,6 +111,7 @@ static ssize_t vol_attribute_show(struct device *dev, | |||
111 | static void vol_release(struct device *dev) | 111 | static void vol_release(struct device *dev) |
112 | { | 112 | { |
113 | struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); | 113 | struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); |
114 | |||
114 | ubi_assert(vol->removed); | 115 | ubi_assert(vol->removed); |
115 | kfree(vol); | 116 | kfree(vol); |
116 | } | 117 | } |