Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: bcm: Use udelay instead of msleep for delays in nvm.c

This patch uses udelay instead of msleep for delays
because msleep can sleep up to 20ms for any value
less than 20.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kevin McKinney and committed by
Greg Kroah-Hartman
6788d7da 7dcc1327

+9 -9
+9 -9
drivers/staging/bcm/nvm.c
··· 102 102 return uiData; 103 103 } 104 104 if (!(dwRetries%RETRIES_PER_DELAY)) 105 - msleep(1); 105 + udelay(1000); 106 106 uiStatus = 0 ; 107 107 } 108 108 return uiData; ··· 195 195 } 196 196 197 197 if (!(dwRetries%RETRIES_PER_DELAY)) 198 - msleep(1); 198 + udelay(1000); 199 199 } 200 200 201 201 for (dwIndex = 0; dwIndex < dwNumWords; dwIndex++) { ··· 577 577 * the sector erase cycle is 500 ms to 40000 msec. hence sleeping 10 ms 578 578 * won't hamper performance in any case. 579 579 */ 580 - msleep(10); 580 + udelay(10000); 581 581 } while ((uiStatus & 0x1) && (iRetries < 400)); 582 582 583 583 if (uiStatus & 0x1) { ··· 654 654 } 655 655 iRetries--; 656 656 if (iRetries && ((iRetries % FLASH_PER_RETRIES_DELAY) == 0)) 657 - msleep(1); 657 + udelay(1000); 658 658 659 659 } while ((uiStatus & 0x1) && (iRetries > 0)); 660 660 ··· 734 734 * Hence current implementation cycle will intoduce no delay in current path 735 735 */ 736 736 if (iRetries && ((iRetries % FLASH_PER_RETRIES_DELAY) == 0)) 737 - msleep(1); 737 + udelay(1000); 738 738 } while ((uiStatus & 0x1) && (iRetries > 0)); 739 739 740 740 if (uiStatus & 0x1) { ··· 811 811 812 812 iRetries--; 813 813 if (iRetries && ((iRetries % FLASH_PER_RETRIES_DELAY) == 0)) 814 - msleep(1); 814 + udelay(1000); 815 815 816 816 } while ((uiStatus & 0x1) && (iRetries > 0)); 817 817 ··· 886 886 * Hence current implementation cycle will intoduce no delay in current path 887 887 */ 888 888 if (iRetries && ((iRetries % FLASH_PER_RETRIES_DELAY) == 0)) 889 - msleep(1); 889 + udelay(1000); 890 890 891 891 } while ((uiStatus & 0x1) && (iRetries > 0)); 892 892 ··· 1657 1657 } 1658 1658 1659 1659 if (!(uiRetries%RETRIES_PER_DELAY)) 1660 - msleep(1); 1660 + udelay(1000); 1661 1661 1662 1662 uiStatus = 0; 1663 1663 rdmalt(Adapter, EEPROM_SPI_Q_STATUS1_REG, &uiStatus, sizeof(uiStatus)); ··· 1698 1698 } 1699 1699 uiEpromStatus = 0; 1700 1700 if (!(uiRetries%RETRIES_PER_DELAY)) 1701 - msleep(1); 1701 + udelay(1000); 1702 1702 } 1703 1703 1704 1704 return STATUS_SUCCESS;