projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e77dee
)
spi: cf_qspi: Use DIV_ROUND_UP at appropriate place
author
Axel Lin
<axel.lin@ingics.com>
Fri, 14 Jun 2013 13:12:19 +0000
(21:12 +0800)
committer
Jagannadha Sutradharudu Teki
<jaganna@xilinx.com>
Sat, 22 Jun 2013 17:38:01 +0000
(23:08 +0530)
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>
drivers/spi/cf_qspi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/cf_qspi.c
b/drivers/spi/cf_qspi.c
index a37ac4e5264b04db3dd3a558f82c428f1de88b6a..06bcf91a4aa3e6a7d346e7885592af441261d63f 100644
(file)
--- a/
drivers/spi/cf_qspi.c
+++ b/
drivers/spi/cf_qspi.c
@@
-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 */