aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorManuel Schölling <manuel.schoelling@gmx.de>2014-05-31 11:07:51 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-02 20:01:33 -0400
commit8db4ec6641db69f59314894bad6ed7b609e691f6 (patch)
treee8164194b894140f346626b860bf4e5ada4d17dd /drivers/net/wan
parentf6d9b514de2edfd9b72b65024343891f5b2cbd78 (diff)
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>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/farsync.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index bcfff0d62de4..02f6d1cebc15 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -26,6 +26,7 @@
26#include <linux/ioport.h> 26#include <linux/ioport.h>
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/delay.h>
29#include <linux/if.h> 30#include <linux/if.h>
30#include <linux/hdlc.h> 31#include <linux/hdlc.h>
31#include <asm/io.h> 32#include <asm/io.h>
@@ -678,7 +679,6 @@ static inline void
678fst_cpureset(struct fst_card_info *card) 679fst_cpureset(struct fst_card_info *card)
679{ 680{
680 unsigned char interrupt_line_register; 681 unsigned char interrupt_line_register;
681 unsigned long j = jiffies + 1;
682 unsigned int regval; 682 unsigned int regval;
683 683
684 if (card->family == FST_FAMILY_TXU) { 684 if (card->family == FST_FAMILY_TXU) {
@@ -696,16 +696,12 @@ fst_cpureset(struct fst_card_info *card)
696 /* 696 /*
697 * We are delaying here to allow the 9054 to reset itself 697 * We are delaying here to allow the 9054 to reset itself
698 */ 698 */
699 j = jiffies + 1; 699 usleep_range(10, 20);
700 while (jiffies < j)
701 /* Do nothing */ ;
702 outw(0x240f, card->pci_conf + CNTRL_9054 + 2); 700 outw(0x240f, card->pci_conf + CNTRL_9054 + 2);
703 /* 701 /*
704 * We are delaying here to allow the 9054 to reload its eeprom 702 * We are delaying here to allow the 9054 to reload its eeprom
705 */ 703 */
706 j = jiffies + 1; 704 usleep_range(10, 20);
707 while (jiffies < j)
708 /* Do nothing */ ;
709 outw(0x040f, card->pci_conf + CNTRL_9054 + 2); 705 outw(0x040f, card->pci_conf + CNTRL_9054 + 2);
710 706
711 if (pci_write_config_byte 707 if (pci_write_config_byte