/* Returns 0 on success, a negative error code otherwise.  */
static int nand_get_features_op(struct nand_chip *chip, u8 feature, void *data)
/* Returns 0 on success, a negative error code otherwise.  */
static int nand_get_features_op(struct nand_chip *chip, u8 feature, void *data)
{
	struct mtd_info *mtd = nand_to_mtd(chip);
	u8 *params = data;
	int i;
	chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, feature, -1);
	for (i = 0; i < ONFI_SUBFEATURE_PARAM_LEN; ++i)
		params[i] = chip->read_byte(mtd);
	return 0;
}