/* omap_verify_buf - Verify chip data against buffer @mtd: MTD device structure @buf: buffer containing the data to compare @len: number of bytes to compare  */
static int omap_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
/* omap_verify_buf - Verify chip data against buffer @mtd: MTD device structure @buf: buffer containing the data to compare @len: number of bytes to compare  */
static int omap_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
{
	struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
							mtd);
	u16 *p = (u16 *) buf;
	len >>= 1;
	while (len--) {
		if (*p++ != cpu_to_le16(readw(info->nand.IO_ADDR_R)))
			return -EFAULT;
	}
	return 0;
}