Lines Matching refs:dev
20 static inline u8 *yaffs_block_bits(struct yaffs_dev *dev, int blk)
22 if (blk < dev->internal_start_block || blk > dev->internal_end_block) {
28 return dev->chunk_bits +
29 (dev->chunk_bit_stride * (blk - dev->internal_start_block));
32 void yaffs_verify_chunk_bit_id(struct yaffs_dev *dev, int blk, int chunk)
34 if (blk < dev->internal_start_block || blk > dev->internal_end_block ||
35 chunk < 0 || chunk >= dev->param.chunks_per_block) {
43 void yaffs_clear_chunk_bits(struct yaffs_dev *dev, int blk)
45 u8 *blk_bits = yaffs_block_bits(dev, blk);
47 memset(blk_bits, 0, dev->chunk_bit_stride);
50 void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
52 u8 *blk_bits = yaffs_block_bits(dev, blk);
54 yaffs_verify_chunk_bit_id(dev, blk, chunk);
58 void yaffs_set_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
60 u8 *blk_bits = yaffs_block_bits(dev, blk);
62 yaffs_verify_chunk_bit_id(dev, blk, chunk);
66 int yaffs_check_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
68 u8 *blk_bits = yaffs_block_bits(dev, blk);
70 yaffs_verify_chunk_bit_id(dev, blk, chunk);
74 int yaffs_still_some_chunks(struct yaffs_dev *dev, int blk)
76 u8 *blk_bits = yaffs_block_bits(dev, blk);
79 for (i = 0; i < dev->chunk_bit_stride; i++) {
87 int yaffs_count_chunk_bits(struct yaffs_dev *dev, int blk)
89 u8 *blk_bits = yaffs_block_bits(dev, blk);
93 for (i = 0; i < dev->chunk_bit_stride; i++, blk_bits++)