Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 56cd5c15 authored by Illia Smyrnov's avatar Illia Smyrnov Committed by Mark Brown
Browse files

spi: omap2-mcspi: Move bytes per word calculation to the function



Introduce mcspi_bytes_per_word function as replacement for the next code
fragment:

int c = (word_len <= 8)  ? 1 :
	(word_len <= 16) ? 2 :
	/* word_len <= 32 */ 4;

This code used 2 times in current driver code and will be used 2 times in
the next FIFO buffer support patch. Replace it with inline function with clear
name to improve code legibility.

Signed-off-by: default avatarIllia Smyrnov <illia.smyrnov@ti.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 0514dd76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment