spi: cf_qspi: Use DIV_ROUND_UP at appropriate place

This change slightly improves readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Richard Retanubun <richardretanubun@ruggedcom.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
This commit is contained in:
Axel Lin 2013-06-14 21:12:19 +08:00 committed by Jagannadha Sutradharudu Teki
parent 1e77deec6e
commit 0cb8394f81
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
volatile qspi_t *qspi = dev->regs;
u8 *txbuf = (u8 *)dout;
u8 *rxbuf = (u8 *)din;
u32 count = ((bitlen / 8) + (bitlen % 8 ? 1 : 0));
u32 count = DIV_ROUND_UP(bitlen, 8);
u32 n, i = 0;
/* Sanitize arguments */