diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-16 13:00:38 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-26 12:15:15 -0500 |
commit | 89b96b69290668351a33b09372ec1c94cb5748e5 (patch) | |
tree | cdbb79da1c821f2155815119ded20d181c23c7c2 /drivers/mtd/ubi/kapi.c | |
parent | 77c722dde9975361051c5530475f8f92ed67a506 (diff) |
UBI: improve internal interfaces
Pass volume description object to the EBA function which makes
more sense, and EBA function do not have to find the volume
description object by volume ID.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/kapi.c')
-rw-r--r-- | drivers/mtd/ubi/kapi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c index 3bf2c951c2e5..c2fafe6fb2da 100644 --- a/drivers/mtd/ubi/kapi.c +++ b/drivers/mtd/ubi/kapi.c | |||
@@ -332,7 +332,7 @@ int ubi_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset, | |||
332 | if (len == 0) | 332 | if (len == 0) |
333 | return 0; | 333 | return 0; |
334 | 334 | ||
335 | err = ubi_eba_read_leb(ubi, vol_id, lnum, buf, offset, len, check); | 335 | err = ubi_eba_read_leb(ubi, vol, lnum, buf, offset, len, check); |
336 | if (err && err == -EBADMSG && vol->vol_type == UBI_STATIC_VOLUME) { | 336 | if (err && err == -EBADMSG && vol->vol_type == UBI_STATIC_VOLUME) { |
337 | ubi_warn("mark volume %d as corrupted", vol_id); | 337 | ubi_warn("mark volume %d as corrupted", vol_id); |
338 | vol->corrupted = 1; | 338 | vol->corrupted = 1; |
@@ -399,7 +399,7 @@ int ubi_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf, | |||
399 | if (len == 0) | 399 | if (len == 0) |
400 | return 0; | 400 | return 0; |
401 | 401 | ||
402 | return ubi_eba_write_leb(ubi, vol_id, lnum, buf, offset, len, dtype); | 402 | return ubi_eba_write_leb(ubi, vol, lnum, buf, offset, len, dtype); |
403 | } | 403 | } |
404 | EXPORT_SYMBOL_GPL(ubi_leb_write); | 404 | EXPORT_SYMBOL_GPL(ubi_leb_write); |
405 | 405 | ||
@@ -448,7 +448,7 @@ int ubi_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf, | |||
448 | if (len == 0) | 448 | if (len == 0) |
449 | return 0; | 449 | return 0; |
450 | 450 | ||
451 | return ubi_eba_atomic_leb_change(ubi, vol_id, lnum, buf, len, dtype); | 451 | return ubi_eba_atomic_leb_change(ubi, vol, lnum, buf, len, dtype); |
452 | } | 452 | } |
453 | EXPORT_SYMBOL_GPL(ubi_leb_change); | 453 | EXPORT_SYMBOL_GPL(ubi_leb_change); |
454 | 454 | ||
@@ -481,7 +481,7 @@ int ubi_leb_erase(struct ubi_volume_desc *desc, int lnum) | |||
481 | if (vol->upd_marker) | 481 | if (vol->upd_marker) |
482 | return -EBADF; | 482 | return -EBADF; |
483 | 483 | ||
484 | err = ubi_eba_unmap_leb(ubi, vol_id, lnum); | 484 | err = ubi_eba_unmap_leb(ubi, vol, lnum); |
485 | if (err) | 485 | if (err) |
486 | return err; | 486 | return err; |
487 | 487 | ||
@@ -542,7 +542,7 @@ int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum) | |||
542 | if (vol->upd_marker) | 542 | if (vol->upd_marker) |
543 | return -EBADF; | 543 | return -EBADF; |
544 | 544 | ||
545 | return ubi_eba_unmap_leb(ubi, vol_id, lnum); | 545 | return ubi_eba_unmap_leb(ubi, vol, lnum); |
546 | } | 546 | } |
547 | EXPORT_SYMBOL_GPL(ubi_leb_unmap); | 547 | EXPORT_SYMBOL_GPL(ubi_leb_unmap); |
548 | 548 | ||
@@ -587,7 +587,7 @@ int ubi_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype) | |||
587 | if (vol->eba_tbl[lnum] >= 0) | 587 | if (vol->eba_tbl[lnum] >= 0) |
588 | return -EBADMSG; | 588 | return -EBADMSG; |
589 | 589 | ||
590 | return ubi_eba_write_leb(ubi, vol_id, lnum, NULL, 0, 0, dtype); | 590 | return ubi_eba_write_leb(ubi, vol, lnum, NULL, 0, 0, dtype); |
591 | } | 591 | } |
592 | EXPORT_SYMBOL_GPL(ubi_leb_map); | 592 | EXPORT_SYMBOL_GPL(ubi_leb_map); |
593 | 593 | ||