未验证 提交 0ccfd1ba 编写于 作者: Y Yoshitaka Ikeda 提交者: Mark Brown

spi: spi-cadence-quadspi: Revert "Fix division by zero warning"

Revert to change to a better code.

This reverts commit 55cef88b.
Signed-off-by: NYoshitaka Ikeda <ikeda@nskint.co.jp>
Link: https://lore.kernel.org/r/bd30bdb4-07c4-f713-5648-01c898d51f1b@nskint.co.jpSigned-off-by: NMark Brown <broonie@kernel.org>
上级 55cef88b
......@@ -307,13 +307,11 @@ static unsigned int cqspi_calc_rdreg(struct cqspi_flash_pdata *f_pdata)
static unsigned int cqspi_calc_dummy(const struct spi_mem_op *op, bool dtr)
{
unsigned int dummy_clk = 0;
unsigned int dummy_clk;
if (op->dummy.buswidth && op->dummy.nbytes) {
dummy_clk = op->dummy.nbytes * (8 / op->dummy.buswidth);
if (dtr)
dummy_clk /= 2;
}
dummy_clk = op->dummy.nbytes * (8 / op->dummy.buswidth);
if (dtr)
dummy_clk /= 2;
return dummy_clk;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册