Skip to content

Commit

Permalink
Char: rocket, switch long delay to sleep
Browse files Browse the repository at this point in the history
Don't busy wait for whole 1s when registering some rocket modems. Sleep
instead since we are not in atomic.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Feb 7, 2008
1 parent 48103c5 commit 48a67f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/char/rocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2191,10 +2191,10 @@ static __init int register_PCI(int i, struct pci_dev *dev)
num_chan = ports_per_aiop;
for (chan = 0; chan < num_chan; chan++)
sPCIModemReset(ctlp, chan, 1);
mdelay(500);
msleep(500);
for (chan = 0; chan < num_chan; chan++)
sPCIModemReset(ctlp, chan, 0);
mdelay(500);
msleep(500);
rmSpeakerReset(ctlp, rocketModel[i].model);
}
return (1);
Expand Down Expand Up @@ -2309,10 +2309,10 @@ static int __init init_ISA(int i)
total_num_chan = num_chan;
for (chan = 0; chan < num_chan; chan++)
sModemReset(ctlp, chan, 1);
mdelay(500);
msleep(500);
for (chan = 0; chan < num_chan; chan++)
sModemReset(ctlp, chan, 0);
mdelay(500);
msleep(500);
strcpy(rocketModel[i].modelString, "RocketModem ISA");
} else {
strcpy(rocketModel[i].modelString, "RocketPort ISA");
Expand Down

0 comments on commit 48a67f5

Please sign in to comment.