diff options
author | Christoph Hellwig <hch@lst.de> | 2007-05-21 10:41:46 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-07-18 09:53:49 -0400 |
commit | 3261ebd7d4194ff30d0eae7ba8d937dcccf7235d (patch) | |
tree | 75381f6dd24263cdf484ebc9a5c8a93db6d83cb4 /drivers/mtd/ubi/vmt.c | |
parent | bf07803a6827ef8d4c9d840a1de800ba36db0213 (diff) |
UBI: kill homegrown endian macros
Kill UBI's homegrown endianess handling and replace it with
the standard kernel endianess handling.
Signed-off-by: Christoph Hellwig <hch@lst.de>
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 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index 4add5c816b14..6e135996e42d 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -319,10 +319,10 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
319 | 319 | ||
320 | /* Fill volume table record */ | 320 | /* Fill volume table record */ |
321 | memset(&vtbl_rec, 0, sizeof(struct ubi_vtbl_record)); | 321 | memset(&vtbl_rec, 0, sizeof(struct ubi_vtbl_record)); |
322 | vtbl_rec.reserved_pebs = cpu_to_ubi32(vol->reserved_pebs); | 322 | vtbl_rec.reserved_pebs = cpu_to_be32(vol->reserved_pebs); |
323 | vtbl_rec.alignment = cpu_to_ubi32(vol->alignment); | 323 | vtbl_rec.alignment = cpu_to_be32(vol->alignment); |
324 | vtbl_rec.data_pad = cpu_to_ubi32(vol->data_pad); | 324 | vtbl_rec.data_pad = cpu_to_be32(vol->data_pad); |
325 | vtbl_rec.name_len = cpu_to_ubi16(vol->name_len); | 325 | vtbl_rec.name_len = cpu_to_be16(vol->name_len); |
326 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) | 326 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) |
327 | vtbl_rec.vol_type = UBI_VID_DYNAMIC; | 327 | vtbl_rec.vol_type = UBI_VID_DYNAMIC; |
328 | else | 328 | else |
@@ -502,7 +502,7 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs) | |||
502 | 502 | ||
503 | /* Change volume table record */ | 503 | /* Change volume table record */ |
504 | memcpy(&vtbl_rec, &ubi->vtbl[vol_id], sizeof(struct ubi_vtbl_record)); | 504 | memcpy(&vtbl_rec, &ubi->vtbl[vol_id], sizeof(struct ubi_vtbl_record)); |
505 | vtbl_rec.reserved_pebs = cpu_to_ubi32(reserved_pebs); | 505 | vtbl_rec.reserved_pebs = cpu_to_be32(reserved_pebs); |
506 | err = ubi_change_vtbl_record(ubi, vol_id, &vtbl_rec); | 506 | err = ubi_change_vtbl_record(ubi, vol_id, &vtbl_rec); |
507 | if (err) | 507 | if (err) |
508 | goto out_acc; | 508 | goto out_acc; |
@@ -650,7 +650,7 @@ static void paranoid_check_volume(const struct ubi_device *ubi, int vol_id) | |||
650 | long long n; | 650 | long long n; |
651 | const char *name; | 651 | const char *name; |
652 | 652 | ||
653 | reserved_pebs = ubi32_to_cpu(ubi->vtbl[vol_id].reserved_pebs); | 653 | reserved_pebs = be32_to_cpu(ubi->vtbl[vol_id].reserved_pebs); |
654 | 654 | ||
655 | if (!vol) { | 655 | if (!vol) { |
656 | if (reserved_pebs) { | 656 | if (reserved_pebs) { |
@@ -764,9 +764,9 @@ static void paranoid_check_volume(const struct ubi_device *ubi, int vol_id) | |||
764 | } | 764 | } |
765 | } | 765 | } |
766 | 766 | ||
767 | alignment = ubi32_to_cpu(ubi->vtbl[vol_id].alignment); | 767 | alignment = be32_to_cpu(ubi->vtbl[vol_id].alignment); |
768 | data_pad = ubi32_to_cpu(ubi->vtbl[vol_id].data_pad); | 768 | data_pad = be32_to_cpu(ubi->vtbl[vol_id].data_pad); |
769 | name_len = ubi16_to_cpu(ubi->vtbl[vol_id].name_len); | 769 | name_len = be16_to_cpu(ubi->vtbl[vol_id].name_len); |
770 | upd_marker = ubi->vtbl[vol_id].upd_marker; | 770 | upd_marker = ubi->vtbl[vol_id].upd_marker; |
771 | name = &ubi->vtbl[vol_id].name[0]; | 771 | name = &ubi->vtbl[vol_id].name[0]; |
772 | if (ubi->vtbl[vol_id].vol_type == UBI_VID_DYNAMIC) | 772 | if (ubi->vtbl[vol_id].vol_type == UBI_VID_DYNAMIC) |