diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-24 10:04:01 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-25 09:41:25 -0500 |
commit | 1b68d0eea5daddc762c54bf02154f4ad607d9ce8 (patch) | |
tree | e918b5d434da7213a7af8cff2b6bd692035f72cf /drivers/mtd/ubi/cdev.c | |
parent | 0411e7353192d7deebd4f50b9ee41974ec3a634c (diff) |
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>
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index d9bd49421cce..0c4044d6cae0 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -354,7 +354,7 @@ static ssize_t vol_cdev_write(struct file *file, const char __user *buf, | |||
354 | if (!vol->updating) | 354 | if (!vol->updating) |
355 | return vol_cdev_direct_write(file, buf, count, offp); | 355 | return vol_cdev_direct_write(file, buf, count, offp); |
356 | 356 | ||
357 | err = ubi_more_update_data(ubi, vol->vol_id, buf, count); | 357 | err = ubi_more_update_data(ubi, vol, buf, count); |
358 | if (err < 0) { | 358 | if (err < 0) { |
359 | ubi_err("cannot write %zd bytes of update data, error %d", | 359 | ubi_err("cannot write %zd bytes of update data, error %d", |
360 | count, err); | 360 | count, err); |
@@ -427,7 +427,7 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file, | |||
427 | if (err < 0) | 427 | if (err < 0) |
428 | break; | 428 | break; |
429 | 429 | ||
430 | err = ubi_start_update(ubi, vol->vol_id, bytes); | 430 | err = ubi_start_update(ubi, vol, bytes); |
431 | if (bytes == 0) | 431 | if (bytes == 0) |
432 | revoke_exclusive(desc, UBI_READWRITE); | 432 | revoke_exclusive(desc, UBI_READWRITE); |
433 | break; | 433 | break; |