From: Manuel Schölling Date: Sat, 31 May 2014 15:07:51 +0000 (+0200) Subject: wan: Use usleep_range() X-Git-Tag: v3.16-rc1~27^2~88 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8db4ec6641db69f59314894bad6ed7b609e691f6;p=~emulex%2Finfiniband.git wan: Use usleep_range() Instead of using a jiffies hack we can use the standard api for delays. Signed-off-by: Manuel Schölling Signed-off-by: David S. Miller --- diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index bcfff0d62de..02f6d1cebc1 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -678,7 +679,6 @@ static inline void fst_cpureset(struct fst_card_info *card) { unsigned char interrupt_line_register; - unsigned long j = jiffies + 1; unsigned int regval; if (card->family == FST_FAMILY_TXU) { @@ -696,16 +696,12 @@ fst_cpureset(struct fst_card_info *card) /* * We are delaying here to allow the 9054 to reset itself */ - j = jiffies + 1; - while (jiffies < j) - /* Do nothing */ ; + usleep_range(10, 20); outw(0x240f, card->pci_conf + CNTRL_9054 + 2); /* * We are delaying here to allow the 9054 to reload its eeprom */ - j = jiffies + 1; - while (jiffies < j) - /* Do nothing */ ; + usleep_range(10, 20); outw(0x040f, card->pci_conf + CNTRL_9054 + 2); if (pci_write_config_byte