mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
spi: meson-spicc: Use FIELD_MODIFY()
Use FIELD_MODIFY() to remove open-coded bit manipulation. No functional change intended. Signed-off-by: Hans Zhang <18255117159@163.com> Link: https://patch.msgid.link/20260430155456.36998-5-18255117159@163.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6fa473f4c5
commit
cfdab17cd2
|
|
@ -539,9 +539,8 @@ static void meson_spicc_setup_xfer(struct meson_spicc_device *spicc,
|
|||
conf = conf_orig = readl_relaxed(spicc->base + SPICC_CONREG);
|
||||
|
||||
/* Setup word width */
|
||||
conf &= ~SPICC_BITLENGTH_MASK;
|
||||
conf |= FIELD_PREP(SPICC_BITLENGTH_MASK,
|
||||
(spicc->bytes_per_word << 3) - 1);
|
||||
FIELD_MODIFY(SPICC_BITLENGTH_MASK, &conf,
|
||||
(spicc->bytes_per_word << 3) - 1);
|
||||
|
||||
/* Ignore if unchanged */
|
||||
if (conf != conf_orig)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user