[PATCH V2] mtd: fsl-quadspi: Access multiple chips simultaneously
Fabio Estevam
festevam at gmail.com
Tue May 12 15:40:12 PDT 2015
On Tue, May 12, 2015 at 7:27 PM, Han Xu <b45815 at freescale.com> wrote:
> Add supports for simultaneous access to multiple chips. Need to lock
> the mutex before any quad spi operations and unlock the mutex after
> operations complete.
>
> Rebase to latest l2-mtd code and resend.
It seems this would be better below the --- line.
> static inline int is_vybrid_qspi(struct fsl_qspi *q)
> @@ -761,6 +763,7 @@ static int fsl_qspi_prep(struct spi_nor *nor, enum spi_nor_ops ops)
> struct fsl_qspi *q = nor->priv;
> int ret;
>
> + mutex_lock(&q->lock);
> ret = clk_enable(q->clk_en);
> if (ret)
> return ret;
You forgot to unlock the mutex on error.
More information about the linux-mtd
mailing list