Commit 219a8d13 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Brian Norris

mtd: fsl-quadspi: cleanup wait_for_completion return handling

return type of wait_for_completion_timeout is unsigned long not int, this
patch uses the return value of wait_for_completion_timeout in the condition
directly rather than adding a additional appropriately typed variable.
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Acked-by: default avatarHan Xu <han.xu@freescale.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent dc6525c6
...@@ -460,8 +460,7 @@ fsl_qspi_runcmd(struct fsl_qspi *q, u8 cmd, unsigned int addr, int len) ...@@ -460,8 +460,7 @@ fsl_qspi_runcmd(struct fsl_qspi *q, u8 cmd, unsigned int addr, int len)
writel((seqid << QUADSPI_IPCR_SEQID_SHIFT) | len, base + QUADSPI_IPCR); writel((seqid << QUADSPI_IPCR_SEQID_SHIFT) | len, base + QUADSPI_IPCR);
/* Wait for the interrupt. */ /* Wait for the interrupt. */
err = wait_for_completion_timeout(&q->c, msecs_to_jiffies(1000)); if (!wait_for_completion_timeout(&q->c, msecs_to_jiffies(1000))) {
if (!err) {
dev_err(q->dev, dev_err(q->dev,
"cmd 0x%.2x timeout, addr@%.8x, FR:0x%.8x, SR:0x%.8x\n", "cmd 0x%.2x timeout, addr@%.8x, FR:0x%.8x, SR:0x%.8x\n",
cmd, addr, readl(base + QUADSPI_FR), cmd, addr, readl(base + QUADSPI_FR),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment