diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-10-18 19:37:36 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-10-18 19:37:36 +0300 |
commit | dd72f9c7e512da377074d47d990564959b772643 (patch) | |
tree | 86fe3475c070f33261a307177d5d5a2686e25084 /drivers | |
parent | e1e80380f1c25aec736ce1a2e46fac9f9631b71a (diff) | |
parent | 2ec8b010979036c2fe79a64adb6ecc0bd11e91d1 (diff) | |
download | linux-dd72f9c7e512da377074d47d990564959b772643.tar.xz |
Merge tag 'spi-fix-v6-6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fix from Mark Brown:
"A fix for the npcm-fiu driver in cases where there are no dummy bytes
during reads"
* tag 'spi-fix-v6-6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-npcm-fiu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c index 0ca21ff0e9cc..e42248519688 100644 --- a/drivers/spi/spi-npcm-fiu.c +++ b/drivers/spi/spi-npcm-fiu.c @@ -353,8 +353,9 @@ static int npcm_fiu_uma_read(struct spi_mem *mem, uma_cfg |= ilog2(op->cmd.buswidth); uma_cfg |= ilog2(op->addr.buswidth) << NPCM_FIU_UMA_CFG_ADBPCK_SHIFT; - uma_cfg |= ilog2(op->dummy.buswidth) - << NPCM_FIU_UMA_CFG_DBPCK_SHIFT; + if (op->dummy.nbytes) + uma_cfg |= ilog2(op->dummy.buswidth) + << NPCM_FIU_UMA_CFG_DBPCK_SHIFT; uma_cfg |= ilog2(op->data.buswidth) << NPCM_FIU_UMA_CFG_RDBPCK_SHIFT; uma_cfg |= op->dummy.nbytes << NPCM_FIU_UMA_CFG_DBSIZ_SHIFT; |