From: Pavel Machek Date: Fri, 11 Jul 2014 09:39:37 +0000 (+0200) Subject: bootp can use mdelay X-Git-Tag: v2014.10-rc1~107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8e8d73b4a5ae051ca2de091151677f2d8340c1f6;p=u-boot bootp can use mdelay Cleanup bootp code by using mdelay. Signed-off-by: Pavel Machek Acked-by: Marek Vasut --- diff --git a/net/bootp.c b/net/bootp.c index 189a003835..fdb97cb562 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -605,7 +605,7 @@ BootpRequest(void) int extlen, pktlen, iplen; int eth_hdr_size; #ifdef CONFIG_BOOTP_RANDOM_DELAY - ulong i, rand_ms; + ulong rand_ms; #endif bootstage_mark_name(BOOTSTAGE_ID_BOOTP_START, "bootp_start"); @@ -623,8 +623,7 @@ BootpRequest(void) rand_ms = rand() >> 19; printf("Random delay: %ld ms...\n", rand_ms); - for (i = 0; i < rand_ms; i++) - udelay(1000); /*Wait 1ms*/ + mdelay(rand_ms); #endif /* CONFIG_BOOTP_RANDOM_DELAY */