/* Write status register 1 byte Returns negative if error occurred.  */
static int write_sr(struct spi_nor *nor, u8 val)
/* Write status register 1 byte Returns negative if error occurred.  */
static int write_sr(struct spi_nor *nor, u8 val)
{
	nor->cmd_buf[0] = val;
	return spi_nor_write_reg(nor, SPINOR_OP_WRSR, nor->cmd_buf, 1);
}