diff options
author | Mario Six <mario.six@gdsys.cc> | 2019-04-28 23:28:48 +0300 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2019-06-10 15:29:49 +0300 |
commit | 5ccfb8a9957d1ca67082b80b27d4c9c10fc13ae0 (patch) | |
tree | a256a9d16cd5afd9804362f0655a73581bfa1ad7 /drivers/spi | |
parent | 8dea61da199540abc56e397f811f72debdd53d1c (diff) | |
download | u-boot-5ccfb8a9957d1ca67082b80b27d4c9c10fc13ae0.tar.xz |
spi: mpc8xxx: Rename variable
The variable "char_size" holds the number of bits to be transferred in
the current loop iteration. A better name would be "xfer_bitlen", which
we rename this variable to.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/mpc8xxx_spi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 83fd8b3cc1..63d956a295 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -114,10 +114,10 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, while (num_blks--) { int tm; u32 tmpdout = 0; - uchar char_size = (bitlen >= 32 ? 32 : bitlen); + uchar xfer_bitlen = (bitlen >= 32 ? 32 : bitlen); /* Shift data so it's msb-justified */ - tmpdout = *(u32 *)dout >> (32 - char_size); + tmpdout = *(u32 *)dout >> (32 - xfer_bitlen); /* The LEN field of the SPMODE register is set as follows: * @@ -165,8 +165,8 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, tmpdin = in_be32(&spi->rx); setbits_be32(&spi->event, SPI_EV_NE); - *(u32 *)din = (tmpdin << (32 - char_size)); - if (char_size == 32) { + *(u32 *)din = (tmpdin << (32 - xfer_bitlen)); + if (xfer_bitlen == 32) { /* Advance output buffer by 32 bits */ din += 4; } |