Commit d532c28b authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Vignesh Raghavendra

mtd: cfi_util: use DIV_ROUND_UP() in cfi_udelay()

Use DIV_ROUND_UP() in cfi_udelay() instead of open-coding it...

Doing this also helpfully gets rid of two complaints from
'scripts/checkpatch.pl --strict':

CHECK: spaces preferred around that '+' (ctx:VxV)
#29: FILE: drivers/mtd/chips/cfi_util.c:29:
+		msleep((us+999)/1000);
 		          ^

CHECK: spaces preferred around that '/' (ctx:VxV)
#29: FILE: drivers/mtd/chips/cfi_util.c:29:
+		msleep((us+999)/1000);
			       ^
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
parent 54ecb8f7
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
void cfi_udelay(int us) void cfi_udelay(int us)
{ {
if (us >= 1000) { if (us >= 1000) {
msleep((us+999)/1000); msleep(DIV_ROUND_UP(us, 1000));
} else { } else {
udelay(us); udelay(us);
cond_resched(); cond_resched();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment