/* winbond_spinand_detect - initialize device related part in spinand_device struct if it is a Winbond device. @spinand: SPI NAND device structure  */
static int winbond_spinand_detect(struct spinand_device *spinand)
/* winbond_spinand_detect - initialize device related part in spinand_device struct if it is a Winbond device. @spinand: SPI NAND device structure  */
static int winbond_spinand_detect(struct spinand_device *spinand)
{
	u8 *id = spinand->id.data;
	int ret;
	if (id[1] != SPINAND_MFR_WINBOND)
		return 0;
	ret = spinand_match_and_init(spinand, winbond_spinand_table,
				     ARRAY_SIZE(winbond_spinand_table), id[2]);
	if (ret)
		return ret;
	return 1;
}