/* The function expects, that the device is already selected  */
static int nand_check_wp(struct mtd_info *mtd)
/* The function expects, that the device is already selected  */
static int nand_check_wp(struct mtd_info *mtd)
{
	struct nand_chip *chip = mtd->priv;
	chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
	return (chip->read_byte(mtd) & NAND_STATUS_WP) ? 0 : 1;
}