UBI: simplify internal interfaces
Instead of passing vol_id to all functions and then find
struct ubi_volume, pass struct ubi_volume pointer.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index d9bd494..0c4044d 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -354,7 +354,7 @@
if (!vol->updating)
return vol_cdev_direct_write(file, buf, count, offp);
- err = ubi_more_update_data(ubi, vol->vol_id, buf, count);
+ err = ubi_more_update_data(ubi, vol, buf, count);
if (err < 0) {
ubi_err("cannot write %zd bytes of update data, error %d",
count, err);
@@ -427,7 +427,7 @@
if (err < 0)
break;
- err = ubi_start_update(ubi, vol->vol_id, bytes);
+ err = ubi_start_update(ubi, vol, bytes);
if (bytes == 0)
revoke_exclusive(desc, UBI_READWRITE);
break;