spi: mpc8xxx: Make code more readable
authorMario Six <mario.six@gdsys.cc>
Sun, 28 Apr 2019 20:28:47 +0000 (01:58 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 10 Jun 2019 12:29:48 +0000 (17:59 +0530)
commit8dea61da199540abc56e397f811f72debdd53d1c
tree8c780b506457555b353aa1ab6e54734ab2be9444
parent65f88e0408e8ddba827fb9ace1596591365f0b79
spi: mpc8xxx: Make code more readable

Introduce the to_prescale_mod and set_char_len inline functions to make
the code more readable.

Note that the added "if (bitlen > 16)" check does not change the
semantics of the current code, and hence only preserves the current
error (this will be fixed in a later patch in the series).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/spi/mpc8xxx_spi.c