Skip to content
Unverified Commit 53fadb4d authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Mark Brown
Browse files

spi: spi-fsl-dspi: Simplify bytes_per_word gymnastics



Reduce the if-then-else-if-then-else sequence to:
 - a simple division in the case of bytes_per_word calculation
 - a memcpy command with a variable size. The semantics of larger-than-8
   xfer->bits_per_word is that those words are to be interpreted and
   transmitted in CPU native endianness.

Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20200304220044.11193-2-olteanv@gmail.com
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent cb71d8ef
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