lkml.org 
[lkml]   [2019]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 1/2] mtd: spi-nor: Move m25p80 code in spi-nor.c
Date


On 07/25/2019 02:19 PM, Tudor.Ambarus@microchip.com wrote:
> static int spi_nor_spimem_xfer_reg(struct spi_nor *nor, struct spi_mem_op *op)
> {
> if (!op || (op->data.nbytes && !nor->cmd_buf))

!nor->cmd_buf can't be NULL, we can get rid of this check too, and use
spi_mem_exec_op() directly when interacting with registers.

> return -EINVAL;
>
> return spi_mem_exec_op(nor->spimem, op);
> }
\
 
 \ /
  Last update: 2019-07-25 13:45    [W:0.117 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site