Lines Matching refs:data_buf
113 u8 *data_buf, *oob_buf; in nanddev_read_bbt() local
130 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_read_bbt()
131 if (!data_buf) in nanddev_read_bbt()
135 kfree(data_buf); in nanddev_read_bbt()
140 bbt_info = (struct nanddev_bbt_info *)(data_buf + nbytes); in nanddev_read_bbt()
144 ops.datbuf = data_buf; in nanddev_read_bbt()
169 !bbt_check_hash(data_buf, nbytes + sizeof(struct nanddev_bbt_info) - 4, bbt_info->hash)) { in nanddev_read_bbt()
180 memcpy(nand->bbt.cache, data_buf, nbytes); in nanddev_read_bbt()
185 bbt_dbg_hex("bbt", data_buf, nbytes + sizeof(struct nanddev_bbt_info)); in nanddev_read_bbt()
194 memcpy(nand->bbt.cache, data_buf, nbytes); in nanddev_read_bbt()
212 kfree(data_buf); in nanddev_read_bbt()
225 u8 *data_buf, *oob_buf; in nanddev_write_bbt() local
244 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_write_bbt()
245 if (!data_buf) in nanddev_write_bbt()
249 kfree(data_buf); in nanddev_write_bbt()
254 bbt_info = (struct nanddev_bbt_info *)(data_buf + nbytes); in nanddev_write_bbt()
256 memcpy(data_buf, nand->bbt.cache, nbytes); in nanddev_write_bbt()
259 bbt_info->hash = js_hash(data_buf, nbytes + sizeof(struct nanddev_bbt_info) - 4); in nanddev_write_bbt()
269 ops.datbuf = data_buf; in nanddev_write_bbt()
290 kfree(data_buf); in nanddev_write_bbt()