wan: Use usleep_range()

Instead of using a jiffies hack we can use the standard api for delays.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Manuel Schölling 2014-05-31 17:07:51 +02:00 committed by David S. Miller
parent f6d9b514de
commit 8db4ec6641

View File

@ -26,6 +26,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/if.h> #include <linux/if.h>
#include <linux/hdlc.h> #include <linux/hdlc.h>
#include <asm/io.h> #include <asm/io.h>
@ -678,7 +679,6 @@ static inline void
fst_cpureset(struct fst_card_info *card) fst_cpureset(struct fst_card_info *card)
{ {
unsigned char interrupt_line_register; unsigned char interrupt_line_register;
unsigned long j = jiffies + 1;
unsigned int regval; unsigned int regval;
if (card->family == FST_FAMILY_TXU) { 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 * We are delaying here to allow the 9054 to reset itself
*/ */
j = jiffies + 1; usleep_range(10, 20);
while (jiffies < j)
/* Do nothing */ ;
outw(0x240f, card->pci_conf + CNTRL_9054 + 2); outw(0x240f, card->pci_conf + CNTRL_9054 + 2);
/* /*
* We are delaying here to allow the 9054 to reload its eeprom * We are delaying here to allow the 9054 to reload its eeprom
*/ */
j = jiffies + 1; usleep_range(10, 20);
while (jiffies < j)
/* Do nothing */ ;
outw(0x040f, card->pci_conf + CNTRL_9054 + 2); outw(0x040f, card->pci_conf + CNTRL_9054 + 2);
if (pci_write_config_byte if (pci_write_config_byte