/* Returns 0 on success, a negative error code otherwise.  */
int nand_status_op(struct nand_chip *chip, u8 *status)
/* Returns 0 on success, a negative error code otherwise.  */
int nand_status_op(struct nand_chip *chip, u8 *status)
{
	struct mtd_info *mtd = nand_to_mtd(chip);
	chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
	if (status)
		*status = chip->read_byte(mtd);
	return 0;
}