yaffs Make more symbol changes
[yaffs2.git] / yaffs_bitmap.c
index a24dbb7c91a9eece9e51c5c5be017c657316f61f..1769e9b47e15e6725151abf71dbca2d414be912f 100644 (file)
  * Chunk bitmap manipulations
  */
 
-static Y_INLINE __u8 *yaffs_BlockBits(yaffs_Device *dev, int blk)
+static Y_INLINE __u8 *yaffs_BlockBits(yaffs_dev_t *dev, int blk)
 {
-       if (blk < dev->internalStartBlock || blk > dev->internalEndBlock) {
+       if (blk < dev->internal_start_block || blk > dev->internal_end_block) {
                T(YAFFS_TRACE_ERROR,
                        (TSTR("**>> yaffs: BlockBits block %d is not valid" TENDSTR),
                        blk));
                YBUG();
        }
-       return dev->chunkBits +
-               (dev->chunkBitmapStride * (blk - dev->internalStartBlock));
+       return dev->chunk_bits +
+               (dev->chunk_bit_stride * (blk - dev->internal_start_block));
 }
 
-void yaffs_verify_chunk_bit_id(yaffs_Device *dev, int blk, int chunk)
+void yaffs_verify_chunk_bit_id(yaffs_dev_t *dev, int blk, int chunk)
 {
-       if (blk < dev->internalStartBlock || blk > dev->internalEndBlock ||
-                       chunk < 0 || chunk >= dev->param.nChunksPerBlock) {
+       if (blk < dev->internal_start_block || blk > dev->internal_end_block ||
+                       chunk < 0 || chunk >= dev->param.chunks_per_block) {
                T(YAFFS_TRACE_ERROR,
                (TSTR("**>> yaffs: Chunk Id (%d:%d) invalid"TENDSTR),
                        blk, chunk));
@@ -40,14 +40,14 @@ void yaffs_verify_chunk_bit_id(yaffs_Device *dev, int blk, int chunk)
        }
 }
 
-void yaffs_clear_chunk_bits(yaffs_Device *dev, int blk)
+void yaffs_clear_chunk_bits(yaffs_dev_t *dev, int blk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
 
-       memset(blkBits, 0, dev->chunkBitmapStride);
+       memset(blkBits, 0, dev->chunk_bit_stride);
 }
 
-void yaffs_clear_chunk_bit(yaffs_Device *dev, int blk, int chunk)
+void yaffs_clear_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
 
@@ -56,7 +56,7 @@ void yaffs_clear_chunk_bit(yaffs_Device *dev, int blk, int chunk)
        blkBits[chunk / 8] &= ~(1 << (chunk & 7));
 }
 
-void yaffs_set_chunk_bit(yaffs_Device *dev, int blk, int chunk)
+void yaffs_set_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
 
@@ -65,7 +65,7 @@ void yaffs_set_chunk_bit(yaffs_Device *dev, int blk, int chunk)
        blkBits[chunk / 8] |= (1 << (chunk & 7));
 }
 
-int yaffs_check_chunk_bit(yaffs_Device *dev, int blk, int chunk)
+int yaffs_check_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
        yaffs_verify_chunk_bit_id(dev, blk, chunk);
@@ -73,11 +73,11 @@ int yaffs_check_chunk_bit(yaffs_Device *dev, int blk, int chunk)
        return (blkBits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0;
 }
 
-int yaffs_still_some_chunks(yaffs_Device *dev, int blk)
+int yaffs_still_some_chunks(yaffs_dev_t *dev, int blk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
        int i;
-       for (i = 0; i < dev->chunkBitmapStride; i++) {
+       for (i = 0; i < dev->chunk_bit_stride; i++) {
                if (*blkBits)
                        return 1;
                blkBits++;
@@ -85,12 +85,12 @@ int yaffs_still_some_chunks(yaffs_Device *dev, int blk)
        return 0;
 }
 
-int yaffs_count_chunk_bits(yaffs_Device *dev, int blk)
+int yaffs_count_chunk_bits(yaffs_dev_t *dev, int blk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
        int i;
        int n = 0;
-       for (i = 0; i < dev->chunkBitmapStride; i++) {
+       for (i = 0; i < dev->chunk_bit_stride; i++) {
                __u8 x = *blkBits;
                while (x) {
                        if (x & 1)