mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-23 16:47:49 -04: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user